|
-
Feb 1st, 2006, 09:35 AM
#1
Thread Starter
Fanatic Member
Value of constants
I want to use the following API function: http://msdn.microsoft.com/library/de...ure_window.asp
How do i know what values the following constants should be set to?
WS_CHILD
WS_VISIBLE
p.s. These constants are described here, but no values are listed
http://msdn.microsoft.com/library/de...ndowStyles.asp
Last edited by x-ice; Feb 24th, 2007 at 07:16 PM.
-
Feb 1st, 2006, 09:40 AM
#2
Re: Value of constants
Code:
// Constant values were found in the "windows.h" header file.
private const int WS_CHILD = 0x40000000,
WS_VISIBLE = 0x10000000;
-
Feb 1st, 2006, 11:05 AM
#3
Thread Starter
Fanatic Member
Re: Value of constants
 Originally Posted by Hack
Code:
// Constant values were found in the "windows.h" header file.
private const int WS_CHILD = 0x40000000,
WS_VISIBLE = 0x10000000;
Do would i go about finding these constants myself?
-
Feb 1st, 2006, 11:17 AM
#4
Re: Value of constants
 Originally Posted by x-ice
Do would i go about finding these constants myself?
I Googled them and Google returned a link to MSDN, so I would image it would be easier just to eliminate the middle man and go straight to MSDN.
-
Feb 1st, 2006, 11:38 AM
#5
Thread Starter
Fanatic Member
-
Feb 1st, 2006, 11:50 AM
#6
Re: Value of constants
One thing that you should note however, is that MSDN isn't always that straight forward.
For example, this is the MSDN link that Google returned. In order to find those declares, you have to scroll about half way down the page until you see a C# example (you will go through a VB and C++ example before you get to C#).
That is the way it is with a lot of their examples, so if you don't see what you are looking for when the page loads, just scroll around. You will probably find it.
-
Feb 1st, 2006, 12:24 PM
#7
Thread Starter
Fanatic Member
Re: Value of constants
 Originally Posted by Hack
One thing that you should note however, is that MSDN isn't always that straight forward.
For example, this is the MSDN link that Google returned. In order to find those declares, you have to scroll about half way down the page until you see a C# example (you will go through a VB and C++ example before you get to C#).
That is the way it is with a lot of their examples, so if you don't see what you are looking for when the page loads, just scroll around. You will probably find it. 
Yes, i noticed that.
-
Feb 1st, 2006, 05:30 PM
#8
Re: Value of constants
The Windows API documentation on MSDN was originally written for C++ developers. It thus assumes that you have the header file in which those constants are declared, so it doesn't need to tell you. I've always been able to find an example on the Web that uses any constant that I've needed to use, so Google is the first place to go. You may also find an example in the API-Guide, which you can download an install locally.
Edit: I just had a quick look at www.pinvoke.net and thay have a list of constants accessible from the menu on the left-hand side. I don't know if it is absolutely complete but it is extensive.
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
|