Advertisement

Mousewheel Support? Anyone? Buehler?

Started by May 21, 2001 04:58 PM
2 comments, last by Jake_77 23 years, 9 months ago
OK, I am wanting to include mousewheel support in a little app of mine, and I was wondering if anyone knew of a good resource for explaining how to handle this in WndProc. Thanks, Jake
My personal opinion would be to learn direct input its SUPER simple and is better in my opinion and its really easy to handle mouse wheel support in it
Advertisement
I agree with Derilect101, DirectInput is the best way, i learnt it pretty quick when i needed to implement camera control, i used the mouse wheel to control the zoom
This link take you to an article about using DirectInput to recieve inputs from the mouse
http://www.gamedev.net/reference/articles/article994.asp

I know this doesnt answer your question, but it provides an alternative

DaveG
I use this method:

#define WM_MOUSEWHEEL 0x020A

LRESULT CALLBACK WndProc( ......

case WM_MOUSEWHEEL:
if ((short) HIWORD(wParam) > 0) mouseWheel = 1;
else mouseWheel = 2;
break;
}

Then just test the mouseWheel variable, if it is 1 it has been scrolled up and if it is 2 it has been scrolled down. Then reset it to 0.

Hope this helps, Aurora

This topic is closed to new replies.

Advertisement