What type of controls don't show up in Spy++/Inspect?

孤人 提交于 2020-12-26 11:23:37

问题


We are working on an Windows Desktop application that pulls values from other controls on other applications. What we have works great for most desktop applications. I have noticed that some controls don't show up in inspect and Spy++. For example, in GP 2015 client only a handful of the controls are addressable in Spy++ and Inspect. The large majority wont show in the repective tree in Spy++ or Inspect. What type of controls don't show in Inspect and for extra credit, how can we talk to them?

Thanks in advance, Steve


回答1:


Spy++ only works with controls that have an HWND associated with them.

Inspect only works with controls that are exposed to UI Automation via the IAccessible, IUIAutomation, and other related interfaces.

So, any custom-made non-windowed non-automatable control will not appear in either tool. Such controls are not available to the outside world, so you cannot communicate with them, or manipulate them. Only the owning app can, since only it has knowledge of what they are and how to interact with them.



来源:https://stackoverflow.com/questions/41174895/what-type-of-controls-dont-show-up-in-spy-inspect

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