Jump to content
  • Advertisement
Sign in to follow this  
sipickles

Mouse wheeling

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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 this post


Link to post
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 this post


Link to post
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!