Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Win32
Hello Everyone..
 
I need bit guidence from u people. Am having third party application that contains BUY & SELL buttons. Given certain conditions If condition is meet, I need to left click on both BUY & SELL buttons simultaneously at the same time, same movement. Till now i did, to move the mouse cursor towards the BUY button & perform left click. But at the same time i need to click on SELL button also.
Is there any way to create another mouse pointer(Virtual mouse pointer), so that one mouse pointer can click on BUY button & other on SELL button at the same time. On other hand, First click on BUY button & after some time then click on SELL button is not accepted because requirement doesn't meet up. Please suggest me some ideas..
 
Thank you..
Posted 19-Jun-12 3:22am
Guru_C++1.2K
Comments
Sergey Alexandrovich Kryukov at 19-Jun-12 10:41am
   
Just a note: nothing is clicked at the same time, ever. If you mean pressing one key, and pressing another one while holding the first one down, this is completely different thing. The primary raw keyboard events are key down and key up, there is no "click", and none of the events are at the same time, even if you use two keyboards.
--SA
Sergey Alexandrovich Kryukov at 19-Jun-12 10:42am
   
And, for goodness sake, why doing all that?..
--SA
Guru_C++ at 20-Jun-12 1:08am
   
Bascically am working on Project Trading application, if BUY price is less than or equalls to SELL price. I need to open the both confirmation windows by clicking both BUY & SELL buttons at the same time. Suppose, first if i click SELL button & then if i click BUY button during that time the price will be moved up.. So i tried to click at the same time. I was not sure it is possible or not. So i asked..
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Please see my comments to the question.
 
I don't think you can have yet another mouse pointer, if I understand you correctly. You can simulate input events on low level using the function SendInput:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[^].
 
This method allows you to simulate input on low level, pretty much as if it comes from a keyboard or a pointing device (mouse) driver.
 
—SA
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Even if you could do it, the event will not be simultaneous.
 
You could try to Post/Send Messages to the application instead of simulating the button press.
 
I'm curious why do you need to "press" both buttons at the same time.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 19-Jun-12 10:46am
   
It depends. I must say, the OP's idea is not clear at all, but the clear simulation is done using SendInput, and Send/Post message may not work. Please see my answer.
--SA
Maximilien at 19-Jun-12 10:53am
   
Yep, I meant to write SendInput (it's not an API I use often,or at all).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 19 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100