Jump to content
  • Advertisement

Archived

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

How to make mouse click?

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

Advertisement
I''m not sure if this is right, but I think there is an API call for this. I think it is something like setmousestate() But don''t quote me on that.

I sure hope this world isn''t one big joke, because I don''t get it.

Share this post


Link to post
Share on other sites
From MSDN:

SendInput
The SendInput function synthesizes keystrokes, mouse motions, and button clicks.

UINT SendInput(
UINT nInputs, // count of input events
LPINPUT pInputs, // array of input events
int cbSize // size of structure
);

HTH.

Forever trusting who we are
And nothing else matters
- Metallica

Share this post


Link to post
Share on other sites
The mouse_event function synthesizes mouse motion and button clicks.

VOID mouse_event(

DWORD dwFlags, // flags specifying various motion/click variants
DWORD dx, // horizontal mouse position or position change
DWORD dy, // vertical mouse position or position change
DWORD dwData, // amount of wheel movement
DWORD dwExtraInfo // 32 bits of application-defined information
);

Share this post


Link to post
Share on other sites
You could use PostMessage to send a WM_LBUTTONDOWN message.

Look it up in msdn if you need more information.

[edited by - Dobbs on April 19, 2002 1:07:29 PM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!