Pelles C forum

C language => Windows questions => Topic started by: _Felix on December 22, 2007, 07:31:55 PM

Title: mousewheel, winuser.h
Post by: _Felix on December 22, 2007, 07:31:55 PM
Hello,
I was just adding mousewheel scrolling to my program, and found WM_MOUSEWHEEL not defined. A search revealed it to be defined in winuser.h; however, adding this include file didn't help. So I have copied and pasted #define WM_MOUSEWHEEL  0x020A from the include file. Seems the wrong way to do things, though. How can I make it work via the include file, just out of interest?

WM_MOUSEWHEEL is defined within this #if:
#if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)

But I don't know enough about things to know whether those symbols are defined, or what compiler options, if any, cause them to be defined. (I'm on win2k, so they should be... hey, maybe that's not it at all).
Title: Re: mousewheel, winuser.h
Post by: TimoVJL on December 22, 2007, 07:49:36 PM
#define _WIN32_WINNT 0x0500
before windows.h

Minimum system required   Minimum value for _WIN32_WINNT and WINVER
Windows Server 2008   0x0600
Windows Vista   0x0600
Windows Server 2003 SP1, Windows XP SP2   0x0502
Windows Server 2003, Windows XP   0x0501
Windows 2000   0x0500
Title: Re: mousewheel, winuser.h
Post by: _Felix on December 22, 2007, 07:54:53 PM
#define _WIN32_WINNT 0x0500...
:) thank you very much.