I want to send a synthetic mouse move event to a windows control. I don't want the actually cursor to move but I want the windows control to think the mouse is moving. The following is what I am doing to achieve this result.
When the mouse is moved, the winControl displays the cursors X,Y coords.Code:::SetForegroundWindow((HWND)winControl->Handle.ToPointer());
::SendMessage((HWND)winControl->Handle.ToPointer(),WM_SETCURSOR,(WPARAM)winControl->Handle.ToPointer(),NULL);
::SendMessage((HWND)winControl->Handle.ToPointer(),WM_MOUSEMOVE,0,MAKELONG(2,0));
In this example, I want the control to think the cursor is at coords (2,0).
However the control says that the cursor is at (5.75, -74.5). Does anyone know why this occurs? Am I not sending the message correctly? Thanks!
