Monday, March 3, 2008

Windows C++ Compilation: error C2065: 'WM_MOUSEWHEEL' : undeclared identifier

// Hack to avoid these errors:
error C2065: 'WM_MOUSEWHEEL' : undeclared identifier
error C3861: 'GET_WHEEL_DELTA_WPARAM': identifier not found

  • Add this to your code ->
#define _WIN32_WINDOWS 0x501
#define _WIN32_WINNT 0x0501

2 comments:

Adrian Kosmaczewski said...

Another hack to avoid that kind of problems is to avoid Windows programming altogether ;) I know, that was an easy one. Sorry for that. :))

Jonathan Maïm said...

Hi Adrian, you're right ;-) Sometimes we don't have the choice, someone needs to use a windows exe ...