Advertisement

mouse move

Started by January 05, 2006 01:04 PM
1 comment, last by mc30900 18 years, 8 months ago
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)
Advertisement
thanks a lot

This topic is closed to new replies.

Advertisement