`
Windows API: Characters count in RTF Text 2003-04-29 -- Jim Kane Newsgroups: comp.lang.clarion This is easy to do with one of two api calls. The GetWindowTextLength(Rtfclassname.hwnd) will tell you the number of characters in the control but doesn't have any flexibility in how the count is done. If you use the sendmessage() api and send the EM_GetTextLengthEX message to the rtf control you can get back the character count or an approximation with many options. Both APIs are well explained in msdn along with all the options for EM_GetTextLengthEX Jim Kane "Salvador Núñez" Printed November 21, 2024, 7:24 am This article has been viewed/printed 35307 times. Google search has resulted in 35 hits on this article since January 25, 2004. |