Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_WIN32_WINNT identifier

Status
Not open for further replies.

EvilCabal

Programmer
Jul 11, 2002
206
CA
Hey,

I just began studying Win API with VC++ and often when I try to compile, some identifier (such as WM_MOUSEWHEEL) are not defined because of this line in winuser.h :

#if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
//declarations such as
#define WM_MOUSEWHEEL 0x020A

What does this line mean and how can I fix it. Thank you for the help.
 
Did you create your project using the AppWizard? If you did it should define symbols like those for you. If you did not use AppWizard you must setup your compiler/linker etc. options yourself.

-pete
 
Those defines specify the minimum requirements of the target system of the build. Not all windows versions support everything, usually it depends on the version of the shell and such present on the system (you will also enounter, occasionally typedefs that refer to internet explorer).

You can fix it like Palbano says, but occasionally I run into the same problem you have and need to define my target system myself to be able to use some specific functionality.

All you need to do is define such a platform before any of the system headers are included.

i.e:

#define _WIN32_WINDOWS xxx //Your version.

#include <windows.h>
Greetings,
Rick
 
Thank you for the quick answer, LazyMe solution works fine but I would like to know where I can change it from the compiler/linker options, I looked but didn't find it. I am using MS VC++ 6.0. Thanx.
 
Try Project->Settings->CategoryLB:preprocessor.
[red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top