Jump to content
  • Advertisement
Sign in to follow this  
KingOfClovis

Mouse Wheel Input

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

I've read some stuff on how to use mouse wheel input, but still don't completely understand how to use it. I know: switch(wParam){ case WM_MOUSEWHEEL: but I don't know how to get the wheel rotation. I suspect that it has to do with the lParam, but I'm not sure how to get it.

Share this post


Link to post
Share on other sites
Advertisement
Have you checked out the MSDN Page on WM_MOUSEWHEEL?

It doesn't give you an absolute rotation, but it tells you how much it was rotated by (the difference from the last position in was in). You can also find out the cursor position, and if any mouse buttons or modifier keys are being held down.
switch(message){
case WM_MOUSEWHEEL:
fwKeys = GET_KEYSTATE_WPARAM(wParam);
zDelta = GET_WHEEL_DELTA_WPARAM(wParam);
xPos = GET_X_LPARAM(lParam);
yPos = GET_Y_LPARAM(lParam);

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!