-
Hi, I have a need to read the text from another application, and as it turns out, WM_GETTEXT doesn't work!! I need to perform some CopyMemory functions and physically locate the text in the memory but I don't fully understand those API calls. Any ideas?
-Jordan
-
WM_GETTEXT works for me.
Code:
Dim tlen As Long, text As String
tlen = SendMessage(hWndofthewindowwhichtextyouwant, WM_GETTEXTLENGTH, 0, 0)
tlen = tlen + 1
text = Space(tlen)
SendMessage hWndofthewindowwhichtextyouwant, WM_GETTEXT, tlen, ByVal text
The text is stored in the text variable.
-
I know that this works for your average window, but I'm not dealing with an average window. :) I need some info on getting the cross-process text via CopyMemory because this appears to be the only way to get the text of this window.
I've read that I first need to create a buffer in the external app and copy the text to that, and then get it from that memory pointer.
-Jordan
-