Wierd windows errors!!!(win32 API)

Started by
3 comments, last by Colin Jeanne 15 years, 10 months ago
i just don't get it. i've included windows.h, user32.lib is in my linker includes, and pressing F1 in VS brings the Identifiers up on MSDN, but i still get errors while compiling. can someone please help??
[source = "c++"]
/*
error C2065: 'SPI_GETWHEELSCROLLLINES' : undeclared identifier
error C2065: 'WHEEL_DELTA' : undeclared identifier
error C2065: 'WM_MOUSEWHEEL' : undeclared identifier
*/
 
  ---------------------------------------------------*/
 
#include <windows.h>
...
...
...
case WM_SETTINGCHANGE:
		SystemParametersInfo (SPI_GETWHEELSCROLLLINES, 0, &ulScrollLines, 0);
 
		//ulScrollLines usually equals 3 or 0(for no scrolling)
		//WHEEL_DELTA equals 120, so iDeltaPerLine will be 40
		if(ulScrollLines)
		{
			iDeltaPerLine = WHEEL_DELTA / ulScrollLines;
		}else
		{
			iDeltaPerLine = 0;
		}
		return 0;


__________________________________________________________Maybe one day i can not be affraid of venturing out of the beginners section.
Advertisement
Try setting the following before your includes

#define _WIN32_WINNT 0x0501
Yeah that did it. what frustrates me is that i don't see anywhere in the MSDN that says to do that. btw, someone on IRC told me to do that, you wouldn't happen to be that person would you? is 0x501 Vista? i used 0x500 for XP
__________________________________________________________Maybe one day i can not be affraid of venturing out of the beginners section.
It does say it on MSDN

Using the Windows Headers

Of course knowing what to search for to find what your looking for are often two different things.

No it wasn't me on IRC :)
0x0500 is Windows 2000
0x0501 is XP
0x0600 is Vista

This topic is closed to new replies.

Advertisement