Sign in to follow this  
of_ownage

detect mouse wheel

Recommended Posts

hey guys, i am using this macro to check for key-presses: #define KEYDOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0) now how do i detect if the use presses the mouse wheel. I want to know if he scrolls with it down/up, but i have no idea if there is a VK keycode for it. Thank you for any help

Share this post


Link to post
Share on other sites
I believe that you can test against VK_MBUTTON with GetAsyncKeyState() to see if the button is pressed. You want to respond to WM_MBUTTONDOWN if you want notifications.

To respond to the wheel scrolling, you need to respond to the WM_MOUSEWHEEL message in your WndProc.

Look up Mouse Input in the Platform SDK help or on MSDN for more information than you could possibly ever need.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this