mouse move
hello i want somthing to happen when the mouse is on some cordinates but instead of getting x and y i just get a long number and i dont know how to deal with it
i did:
case WM_MOUSEMOVE:
{
xofp = float(lParam);
return 0;
}
how do i know the coordinate from the number?
and why does it change if i do full screen or change the resolotion (if the mouse get to the same place...).
thanks in advance
The variable contains four bytes, two of them is the x coordinate and the other two is the y, split them up like this.
case WM_MOUSEMOVE:
{
mouse_x = LOWORD(lParam);
mouse_y = HIWORD(lParam);
}
(mouse_x and mouse_y are integer)
case WM_MOUSEMOVE:
{
mouse_x = LOWORD(lParam);
mouse_y = HIWORD(lParam);
}
(mouse_x and mouse_y are integer)
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement