|
|
Subject:
Simulate Mouse Click
Category: Computers > Programming Asked by: afmatt-ga List Price: $10.00 |
Posted:
22 Oct 2006 19:37 PDT
Expires: 21 Nov 2006 18:37 PST Question ID: 775936 |
Is there a way using Windows API calls to simulate a mouse click at a specific location WITHOUT moving the mouse to that location? Most procedures using SetCursorPos, which is what I want to avoid. |
|
There is no answer at this time. |
|
Subject:
Re: Simulate Mouse Click
From: frde-ga on 22 Oct 2006 23:49 PDT |
If you know the handle of the control that you want to click (assuming it has one) then you could uses SendMessage with WM_LBUTTONDOWN then WM_LBUTTONUP. You could look at the SendInput API Personally I would move the mouse, do Mouse_Event and then move the mouse back to its original position. |
Subject:
Re: Simulate Mouse Click
From: afmatt-ga on 25 Oct 2006 11:36 PDT |
The control does not have a handle. Also, I do not want to move the mouse at all. Any ideas? |
Subject:
Re: Simulate Mouse Click
From: frde-ga on 26 Oct 2006 00:00 PDT |
Strictly speaking if it does not have a Handle then it is not a Control - it will be a pseudo control drawn on a real one Did you look into the SendInput API ? - from MSDN I could not figure out whether a Click paid any attention to the mouse co-ordinates in the Structure. Why don't you want to move the Mouse ? Maybe there is a workaround for the reason why you don't want to move it. You might be better off asking in a programming News Group. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |