Hi all,
I am using the WM_MOUSEWHEEL message in my program, but I am having trouble detecting two things: the direction of scrolling and checking whether or not the mouse wheel itself was pressed/clicked.
I read that the high-order word of the WPARAM parameter returns positive if the user rotated the mouse wheel forward and negative if he/she rotated it backwards. So this is what I did:
Code:
case WM_MOUSEWHEEL:
if(HIWORD(wParam) > 0) //if user rotated the wheel forward
{//handle it accordingly}
if(HIWORD(wParam) < 0) //if user rotated the wheel backward
{//handle it accordingly}
I also read that pressing the mouse wheel is equivalent to the WM_MBUTTONDOWN message, but that is not working in my program.
Thanks to you all.
Bill