I have MSVC++ 6.0, and am attempting to use the WM_MOUSEWHEEL message. I get this error when compiling:
error C2065: 'WM_MOUSEWHEEL' : undeclared identifier
I know that WM_MOUSEWHEEL is defined in winuser.h, which is automatically included when you declare:
#include <windows.h>
I checked winuser.h to see if it was declared within it, and I see it declared only in this section:
Neither _WIN32_WINNT nor _WIN32_WINDOWS is defined. Where should these values be defined, and what should they equal for a WinXP system?Code:#if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) #define WM_MOUSEWHEEL 0x020A #define WM_MOUSELAST 0x020A #else #define WM_MOUSELAST 0x0209 #endif /* if (_WIN32_WINNT < 0x0400) */
(btw, if I changed the switch statement for the WM_MOUSEWHEEL message to this:
the program compiles fine, and the scrolling works.)Code:switch (message) { case 0x020A: // WM_MOUSEWHEEL = 0x020A // handle mouse wheel message }



LinkBack URL
About LinkBacks



But I reckoned you knew what you were doing. 
Sorry, I have to laugh: while MSDN is always the first stop for information, i've found that having a healthy cynicism regarding its actual content (or lack, thereof) is not a bad idea.