Home > Net >  Using SendMessage simulation mouse clicks, but couldn't find the button on the handle, how to b
Using SendMessage simulation mouse clicks, but couldn't find the button on the handle, how to b

Time:10-05

RT, recently there is a demand, have to click a button on a background form, this form is the third party programs, don't know what the language development of the use spy++ view can only see the application window handle, existed in the application form button, text box, do not check all, using SendMessage simulation, click message through spy++ monitoring found that can be executed correctly, such as in the form of 100100 there is a button, spy++ message by clicking here you can see, but observation form, did not perform the action of the button is pressed, analysis should be a form of 100100 are click is not equal to the button is clicked, but the handle to the button can't get ah,,,

Head,

CodePudding user response:

If spy++ does not exist the handle, you send SendMessage should also use
As long as he is to call the system form, temporarily haven't tried to find,
May it is a fake button, such as his may be a Panel, click himself drew button on the Panel, and then determine the location of the mouse click to trigger the event, just as an example, generally do not get
If it is the cause of the third party, the third party offer API or something like that

CodePudding user response:

reference 1st floor it_gz_xi response:
if spy++ does not exist the handle, you should also not send SendMessage
As long as he is to call the system form, temporarily haven't tried to find,
May it is a fake button, such as his may be a Panel, click himself drew button on the Panel, and then determine the location of the mouse click to trigger the event, just as an example, generally do not get
If it is the cause of the third party, the third party provide any API or something like that here


Does not provide the third party is a game form, I doubt button is painted, but if it is painted, then click on the message sent was supposed to useful?

CodePudding user response:

Game form... where the UI is painted, painted on the UI events, you can only be triggered by calls to this function, sendmessage and don't know what's the message you send, and if his program there is no processing,

CodePudding user response:

Simulated mouse clicks, specify the Position and then Click
  •  Tags:  
  • C #
  • Related