Read Items from Control in another Application

☆樱花仙子☆ 提交于 2020-01-06 04:46:08

问题


I have an MDI application for which I do not have source for. I believe it is an MFC application. I need to automate some of it's functionality.

It has a form with a listview type control on it. I would like to be able to read that list from my new C# application to know what the items are so I can select the correct one. I have tried Spy++ from VS2008 but it cannot see the listview control. There are no windows messages that are useful. How can I make the items in this list available to my new application?

Thanks.


回答1:


Is it appearing in Spy++ at all? If it is just a window handle then the whole control is custom drawn in which case you are pretty much out of luck.

The only time you would might be able to query this data would be if it was based on one of the Windows standard controls or if it allows you to query it using messages (which is unlikely unless it was designed to be automated)



来源:https://stackoverflow.com/questions/1771558/read-items-from-control-in-another-application

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