|
-
Aug 25th, 2001, 07:59 AM
#1
Thread Starter
New Member
API Constants List?
In all the discriptions of API functions that i read they all have constans associated with them, but it never says what values the constans are. I've searched all over the MSDN and I can never seem to find a listing of the constants and their values, alot of times API Viewer doesn't have the constants I need. So if you could just point me in the right direction to find a list like that.... that would be great. And if a list like that doesnt exist then to be more specific im tring to find the constants for the messages for the TreeView control.
-
Aug 25th, 2001, 10:01 AM
#2
PowerPoster
I understand your problem completely.
The thing to do is to download the API Guide from www.allapi.net (it has been down recently, but hopefully it's back up). It's a directory of the most common/useful API's, with examples and all sorts of info such as the Types to use and constants.
-
Aug 25th, 2001, 10:26 AM
#3
Since all the constants are (indirectly) written in the windows.h header file, you could use write a small C++ program to help you.
Code:
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
// Replace WM_QUIT with the constant name
cout << WM_QUIT;
return 0;
}
-
Aug 25th, 2001, 11:41 AM
#4
Lively Member
In vb6, there is a file at the following location:
C:\Program Files\Microsoft Visual Studio\Common\Tools\Winapi\WIN32API.TXT
This file includes the visual basic definitions/declarations for (almost) every API function, struct (type), constant, etc.
Hope this helps
-
Aug 26th, 2001, 03:53 AM
#5
I have VC++ installed, and when I need a constant declaration which isn't in the VB API viewer, I do a search in the Microsoft Visual Studio\VC98 directory, and I almost always find what I need.
-
Aug 26th, 2001, 04:53 AM
#6
Yeah, if you have VC++ installed, it is very easy to find the declarations. The header files are in the "Microsoft Visual Studio\VC98\Include" directory and all the api constants are declared in them. Just look for all files in there containing the name of the constant you're looking for. Then open up the files you find in notepad and search for it. It shouldn't be too hard to translate from the C++ #declare line to the VB Const line.
That's how I find the constants that aren't in the API Viewer
-
Aug 27th, 2001, 10:13 PM
#7
Registered User
Well you also google your way out of trouble. This usually gives you an example of how to implement as well.
-
Aug 28th, 2001, 09:02 AM
#8
Originally posted by Tygur
It shouldn't be too hard to translate from the C++ #declare line to the VB Const line.
C++ doesn't have a #declare directive. You're probably referring to #define.
-
Aug 28th, 2001, 02:13 PM
#9
Originally posted by Megatron
C++ doesn't have a #declare directive. You're probably referring to #define.
Whoops..
Thanks, shows how long it's been since I had to do that..
-
Oct 29th, 2001, 10:02 PM
#10
Junior Member
API Constants
If you dont know the name of the constant how can you possibly find it?
-
Oct 30th, 2001, 02:47 AM
#11
The names of the constants needed for the API functions can be found in the MSDN library.
-
Oct 30th, 2001, 10:18 AM
#12
Junior Member
Thank You Frans
Pardon my ignorance but how do I access the MSDN Library? I have Visual Studio but; unfortunately, I am not well versed in any part other than Visual Basic.
Thanks Again
CWCookman
-
Oct 30th, 2001, 12:17 PM
#13
What version of Visual Studio do you have?
If you have 6.0, you can easily get to the MSDN Library by going to the VB6 help. It's part of the MSDN Library.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|