TAF2000
asked on
Getting text from another program SendMessage? WM_GETTEXT
I am trying to get a large amount of text into my program, from a different program. I have tried using:
SendMessage progHWND, WM_GETTEXT, 8192, sText
The problem I am having, is the limit to the size of the text buffer. it's only letting me get a small portion of the text that I need. Is there a different method that will allow me to get much more? Or is there a way I can get portions of it at a time?
Thanks in advance.
SendMessage progHWND, WM_GETTEXT, 8192, sText
The problem I am having, is the limit to the size of the text buffer. it's only letting me get a small portion of the text that I need. Is there a different method that will allow me to get much more? Or is there a way I can get portions of it at a time?
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes, the limt im having problems with is not max int (2147483647) that you refered too..
it is a much lower limitation caused by the string buffer:
Dim sText As String * 8192
it will not let you create a very large string..
so.. is there a way to get around this? using something else in the sendmessage command?
Thanks
it is a much lower limitation caused by the string buffer:
Dim sText As String * 8192
it will not let you create a very large string..
so.. is there a way to get around this? using something else in the sendmessage command?
Thanks
ASKER
zzzzzooc,
just saw your message after replying to jaime's comment. Will give it a shot.
just saw your message after replying to jaime's comment. Will give it a shot.
Oh, one more comment. lngLen may need to be lngLen + 1:
If lngLen > 0 Then
lngLen = lngLen + 1
'etc...
End If
If lngLen > 0 Then
lngLen = lngLen + 1
'etc...
End If
Notice that there is a OS limitation in Edit Boxes. 0x7FFF for Win95/98/Me and 0x7FFFFFFF for WinNT/2000/XP
Read at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/editcontrols/editcontrolreference/editcontrolmessages/em_setlimittext.asp
Good luck,
Jaime.