
window doesn't paint or scroll properly after recieving WM_GETTEXT
My AIM logger is exhibiting a peculiar behavior: when I send the IM window a
WM_GETTEXTLENGTH and WM_GETTEXT message, sometimes (particularly after the
window has lost focus and I force a repaint by dragging another window over
it) the window does not repaint properly, and no longer automatically
scrolls when a new IM is recieved. Has anyone else seen this type of
behavior when using either of these API calls?
The code in question:
Public Function GetText(Window As Long) As String
Dim Cursor As String, Text As Long
Text& = SendMessage(Window&, WM_GETTEXTLENGTH, 0&, 0&)
Cursor$ = String(Text&, 0&)
Call SendMessageByString(Window&, WM_GETTEXT, Text& + 1, Cursor$)
GetText$ = Cursor$
End Function
The entire source code can be browsed here:
http://www.*-*-*.com/
cvsroot=aimlog