Windows 2000, Rich Text Box and WM_GETTEXT
Posted on 2000-04-30
I have been having trouble returning a string from a richtextbox control in Windows 2000 and I need help.
child = findchildbyclass(getpar, "RICHCNTL")
GetTrim = sendmessage(child, WM_GETTEXTLEN, 0, 0)
TrimSpace$ = Space$(GetTrim)
GetString = sendmessage(child, WM_GETTEXT, GetTrim + 1, TrimSpace$)
This works under Windows NT 4.0, 95, 98 but doesn't work under Windows 2000. getpar is the handle of the "RICHCNTL" richtextbox control. WM_GetTextLength works fine and return a length of say 1380 chars. But after I call the WM_GETTEXT I get a return strign of 0 in the TrimSpace$ buffer... Anybody know what's going on??? HELP???