# Mouse wheeling

This topic is 4916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites

try this

#ifndef WM_MOUSEWHEEL
#define WM_MOUSEWHEEL 0x020A
#endif

##### Share on other sites
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

##### Share on other sites
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.)

##### Share on other sites
Quote:
 Defining the value yourself defeats the purpose of having defines in the first place.
True. Docs for this are here

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 11
• 12
• 10
• 11
• 13
• ### Forum Statistics

• Total Topics
634096
• Total Posts
3015480
×