Jump to content
  • Advertisement

Archived

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

Electron

moving the mouse within a program?

This topic is 6884 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
Advertisement
Is there anyone who know how to manipulate the mouse coordinates with a program? (in Windows, of course)

------------------
Electron

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


Share this post


Link to post
Share on other sites
Use SetCursorPos(x, y). Simple, eh? By the way, MSDN is a really good resource for this sort of stuff.

--TheGoop

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!