Jump to content
  • Advertisement

Archived

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

hellfire

How do I make the program simulate a double click?

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

I would like a to create a program that shows how do to certin windows things by doning itself. Does anyone know how to make the mouse double click? or simulate a doubleclick in C++?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
WM_RBUTTONDBLCLK

or

WM_LBUTTONDBLCLK

Share this post


Link to post
Share on other sites
i think he means get the program to control the mouse, sorry but i dont know, just correcting these guys

Share this post


Link to post
Share on other sites
Yeah, I have had the same problem... Except I was trying to make a programm where the user could record his/her mouse movements/clicks, then play them back... to preform common opperations quickly.. yeah, but I did find something at vbapi.com... it only sucseeded in moving the moyuse though... couldnt tell it to be clicked and stuff...

tazzel3d ~ dwiel

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hmm.. let''s see. Windows is a Message based system. The mouse has an event where it sends messages to the top level window when it has moved and when it has double clicked.

If there were only a way to send these messages that the mouse sends.

WM_RBUTTONDBLCLK

or

WM_LBUTTONDBLCLK

I know it seems more elaborate that just calling the function that is called when the WM_LBUTTONDBLCLK message is processed, but it works too.

Marvin, if you don''t know, don''t correct. Look up these messages if you don''t know what they are.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Just use the PostMessage() proc to send your doubleclick messages. Right? I''m new to Windows programming but I think that will work.

Share this post


Link to post
Share on other sites
I imagine you could use SetCursorPos() to change the position of the pointer, then use PostMessage() to send a WM_LBUTTONDBLCLICK message to your application. That should work.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
maybe we should spend less time programming and more time learning how to spell

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
That wasn''t me! I wasn''t the one flaming about spelling!

goatc has the right idea though, and the AP before him

WM_RBUTTONDBLCLK

or

WM_LBUTTONDBLCLK

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!