How would I write a function in c++ to hold a mouse click for a given amount of time and then release? Thank you in advance for any help.
How would I write a function in c++ to hold a mouse click for a given amount of time and then release? Thank you in advance for any help.
What operating system? Using the Win32 API, you'd send messages about mouse events.Originally Posted by zach0616
Away.
Yes I'm using windows. Sorry for not stating that.I understand that WM_LBUTTONDOWN is for a left click, but what about holding it for a certain amount of time?
Last edited by zach0616; 07-06-2005 at 08:11 PM.
tra-la-la MSDN
edit: Darn you for changing your post around on me. Try setting a timer (SetTimer()), sending WM_LBUTTONDOWN, and sending WM_LBUTTONUP when the timer expires.
Last edited by confuted; 07-06-2005 at 08:15 PM.
Away.