Advertisement Jump to content


This topic is now archived and is closed to further replies.


Another simple question (GET_WHEEL_DELTA_WPARAM)?

This topic is 6325 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

Okay, I had this working, but VC (somehow) saved DX SDK's Particle sprite example over the only (working) copy of my program (I might have hit save, but it chose to save it over my program of all things, even though they're located on different drives, hehe). I've since got it back the way it was, except, I'm trying to get the mouse wheel's rotation and store it. I tried useing GET_WHEEL_DELTA_WPARAM, but when I try to compile and run, I get this error: 'GET_WHEEL_DELTA_WPARAM' : undeclared identifier I remember now I had to define something for it to work, but I can't remember what it was, and I couldn't find anything that would help me in MSDN. I made the mistake of going back onto IRC and seeing if anyone ther would help, but yeah. Stupid me. Shoulda known better. Thanks. "When you kill one, it is a tragedy. When you kill ten million, it is a statistic." - Sarlok Edited by - Sarlok on September 25, 2001 5:37:14 PM

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
You probably need to add one of these #defines

#define WINVER 0x0500
#define _WIN32_WINNT = 0x0400

I don''t know which one is better to use or if it even makes a difference.

You can call GetSystemMetrics (SM_MOUSEWHEELPRESENT); to determine if the mouse has a wheel.

Add the WM_MOUSEWHEEL message to your window procedure.
HIWORD(wParam) contains the wheel rotation. It should be a multiple of WHEEL_DELTA (defined to be 120).

According to the winuser.h file, WM_MOUSEWHEEL is defined if _WIN32_WINNT is defined. So I''m guessing that you have to use the second #define that I put at the top if you want all of this to work.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!