Button with no hWnd

試著忘記壹切 提交于 2019-12-25 09:03:04

问题


Good evening folks,

I'm building a simple application (A) that sends Strings to a textbox of another application (B). I was able to this step, but afterwards I'd like to automatically press a button placed just under the textbox. The problem is that I can't get the Handle of the Button; using "Window Detective"(similiar to Spy++), I see only the textboxes (called "TEdit", see the attachments) and no Buttons!. I'd like to add also that there's no only a Button but 3!! So, how could I press a specific Button? Is there another chance to get the Handle?

Program "target"

Window Detective screenshot


回答1:


Based on the class name TEdit that's a VCL application probably coded in Delphi. The buttons are likely TSpeedButton and non-windowed. You won't be able to send them messages and they are not automatable.

Faced with this your best hope of success is to fake input. Fake the mouse click at the appropriate location on the form. It's not pretty but there's little option.



来源:https://stackoverflow.com/questions/39730027/button-with-no-hwnd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!