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:
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) */
Neither _WIN32_WINNT nor _WIN32_WINDOWS is defined. Where should these values be defined, and what should they equal for a WinXP system?
(btw, if I changed the switch statement for the WM_MOUSEWHEEL message to this:
Code:
switch (message)
{
case 0x020A: // WM_MOUSEWHEEL = 0x020A
// handle mouse wheel message
}
the program compiles fine, and the scrolling works.)