Andy Webster

Andy Webster

  • NA
  • 117
  • 0

How can I find WIN32 constants values?

Mar 29 2010 10:42 AM

I am writing some C# code to change screen resolution for a shell application.
I am intending to use the Win32 functions:
EnumDisplayDevices ,EnumDisplaySettings, etc
I have written quite alot of code and have had to use Win32 and pinvoke on many occasions. Every time I have the same issue.My question relates to the various Win32 constants that are referred to in the Microsoft documentation. I believe that if you are programming in C++ then you include header files that predefine these constants.
If working in C# where can I look up the values so that I can define these constants myself?
An example of what I am looking for can be found at:
http://msdn.microsoft.com/en-us/library/dd183413(VS.85).aspx
Using the above example URL as an example where can i look up for instance DM_BITSPERPEL or CDS_FULLSCREEN ?
I eventually find the values through Google searches each time I do Win32 programming for each constant but surely there must be a simpler way?
Hope you can help
Regards, Andy

Answers (4)