vc++6 : WM_MOUSEWHEEL
I''m making my engine OO. So I have a class Engine, with WndProc friend (in wich I handle all mouse msgs). The prob is when I compile, I get the error : error C2065: ''WM_MOUSEWHEEL'' : undeclared identifier
I searched the msdn and tried their example of handling WM_MOUSEWHEEL, wich compile and run correctly. What is wrong?
#define _WIN32_WINNT 0x0400
or
#define _WIN32_WINDOWS 0x0410
before including windows.h.
or
#define _WIN32_WINDOWS 0x0410
before including windows.h.
thanks a lot, it working just fine now!
Well, I''d just like to know why I must define these ??
Well, I''d just like to know why I must define these ??
the message, as msdn states, is only available on win 98 or nt 4 or later systems. if you build a program that uses this message and try to run it on let's say win 95, it will most likely not function properly. if we were dealing with a function, not a message, your program won't start at all because of a missing export. to make sure you know which operating system you're targeting and avoid such surprises, windows headers use guards like the following to protect new declarations:
#if WINVER >= 0x0500
void SomeFunctionThatWasIntroducedWithWindows2000();
#endif
#if _WIN32_WINNT >= 0x0400
void AnotherFunctionThatIsOnlyAvailableOnNt4OrBetter();
#endif
by defining the corresponding macros, you say: "i want features that are implemented only in some versions of windows; i know that my program will not run on earlier windowses."
see using sdk headers page in platform sdk docs for more details.
[edited by - niyaw on January 27, 2003 6:23:37 PM]
#if WINVER >= 0x0500
void SomeFunctionThatWasIntroducedWithWindows2000();
#endif
#if _WIN32_WINNT >= 0x0400
void AnotherFunctionThatIsOnlyAvailableOnNt4OrBetter();
#endif
by defining the corresponding macros, you say: "i want features that are implemented only in some versions of windows; i know that my program will not run on earlier windowses."
see using sdk headers page in platform sdk docs for more details.
[edited by - niyaw on January 27, 2003 6:23:37 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement