This topic is now archived and is closed to further replies.

moving the mouse within a program?

This topic is 6576 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Not sure what exactly you're asking here.

If you want to track the position of the mouse pointer, just capture the WM_MOUSEMOVE event in your message loop. The X position will be in the LOWORD portion of lParam, and the Y position will be in the HIWORD portion of lParam.

If you're trying to move the mouse to a specific co-ordinate, you might want to investigate using the following:

::PostMessage(hWnd, WM_MOUSEMOVE, 0, MAKELPARAM(xPos,yPos));

I'm not sure how well that will work, if at all though. So, if anybody else has a better suggestion...

Share this post

Link to post
Share on other sites
Is there anyone who know how to manipulate the mouse coordinates with a program? (in Windows, of course)


"Who need more than 64kb of RAM?" -Bill gates -89

Share this post

Link to post
Share on other sites