Mouse wheeling

Started by
3 comments, last by zppz 18 years, 8 months ago
Hi, My code uses the WM_LBUTTONDOWN events to perform picking tests. How would I go about activating the mousewheel? I tried WM_MOUSEWHEEL but I get an unrecongised variable error. MSDN doen't recommend much..... does anyone else use this? Thanks Simon
Advertisement

try this

#ifndef WM_MOUSEWHEEL
#define WM_MOUSEWHEEL 0x020A
#endif
The SDK assumes that you are targetting an older version of Windows which does not support certain features.

Defining the value yourself defeats the purpose of having defines in the first place. Not that the value is apt to change in the next version of Windows, but there's no point.

To get around this, you can define the version of Windows you will be running your application on manually. The following code is taken directly from the standard precompiled header in MSVC++ 7.1:

// Modify the following defines if you have to target a platform prior to the ones specified below.// Refer to MSDN for the latest info on corresponding values for different platforms.// Allow use of features specific to Windows 95 and Windows NT 4 or later.#define WINVER 0x0501 // Windows XP// Allow use of features specific to Windows NT 4 or later.#define _WIN32_WINNT 0x0501 // Windows XP			// Allow use of features specific to Windows 98 or later.#define _WIN32_WINDOWS 0x0501 // Windows XP


You need to define the 'target version'

#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#include <windows.h>

(If you have a reasonable recent Platform SDK, of course.)
Quote:Defining the value yourself defeats the purpose of having defines in the first place.
True. Docs for this are here

This topic is closed to new replies.

Advertisement