Text in einem Fenster auslesen?
-
Hi,
ist es möglich, den Text in ein Fenster geschrieben wurde (z.B. anhand des hdc) auszulesen? Leider scheint es ja beim Schreiben in ein Fenster keine entsprechende Window Message zu geben.
Die Messages, die das Fenster, welches ich betrachte, erhält, sind: WM_SYNCPAINT, WM_NCPAINT, WM_ERASEBKGND, WM_CTLCOLORDLG, WM_PAINTgr33tz,
zuckzappel
-
Ist das irgendnen Standard-Control z.B. nen normales Textfeld?
Dann kannst du dessen Handle rauskriegen (FindWindow...) und dann nach dem Text fragen (WM_GETTEXTLENGTH und WM_GETTEXT)
-
Es handelt sich offensichtlich um ein Fenster, in welches mit TextOut etwas reingeschrieben wird und WM_GETTEXT bezieht sich doch nur auf den Fenstertitel, oder?
-
ok, bei TextOut()/DrawText() etc. hab ich keine Ahnung

Worauf sich WM_GETTEXT bezieht kommt auf das Control an:
msdn schrieb:
For an edit control, the text to be copied is the content of the edit control. For a combo box, the text is the content of the edit control (or static-text) portion of the combo box. For a button, the text is the button name. For other windows, the text is the window title.