开发者

how to get a text from a window

This is the window of the application used to view TV Channels on my BT878 TVTunner.

how to get a text from a window

The number 6 from the middle is the number of th开发者_开发技巧e channel. I know the handle of the window. Is there any way (preferably in Delphi programming language) to get that number...?

Thank you for any reply.


If it used an interface of normal Windows controls then you could enumerate the child windows and find the one which contained that text.

However, this looks like a custom drawn window and so I suspect that you only chance would be to do a screen scrape to a bitmap and process that.

You could use Spy to inspect the app and see whether or not there are child windows.


If that channel field has its own HWND, then try sending it a WM_GETTEXT message (use Spy++, Winspector, or other similar tool to see the parent/child relationships of the window's HWNDs). If that does not work, then you may have to resort to capturing an image of the app's window, extracting the pixels used for the channel number, and then parse them to determine which number is being displayed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜