Jump to content
  • Advertisement

Archived

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

BraveZeus

Mouse Clicking

This topic is 6932 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

Does any one know how to arbitrarily click the mouse (imitating an actual mouse click) in C++? Preferably under Windows but DOS calls would be ok. Edited by - BraveZeus on 5/3/00 1:05:40 AM

Share this post


Link to post
Share on other sites
Advertisement
Take a look at the following link to the MSDN library.

http://msdn.microsoft.com/library/psdk/winui/mousinpt_0qjv.htm

With this and the PostMessage(...) function, you should be able to work something out.
(Something like PostMessage(hMainWnd, WM_LBUTTONDBLCLK, 0, pos), where pos contains the x and y values for the cursor position).

*Sparkle*

Edited by - Sparkle on 5/3/00 4:28:33 AM

Darn html...

Edited by - Sparkle on 5/3/00 4:29:11 AM

Share this post


Link to post
Share on other sites
And I just noticed that you wanted a single click...

Well, it should be the same, just use WM_LBUTTONDOWN or
WM_LBUTTONUP instead of WM_LBUTTONDBLCLK.

*Sparkle*

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!