|
-
Oct 10th, 2000, 06:33 PM
#1
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
-
Oct 10th, 2000, 06:43 PM
#2
Frenzied Member
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.
-
Oct 10th, 2000, 10:04 PM
#3
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
-
Oct 20th, 2000, 06:19 PM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|