RE: Adding text to a richedit control
- Posted by Brian Broker <bkb at cnw.com> Apr 12, 2001
- 417 views
Thomas Parslow (PatRat) wrote: > Does anyone know how to add text onto the end of a richedit control? > I'm going to have a richedit with a lot of formatted stuff in it then I > want to add a small piece of text to the end, I'd really rather not > retrieve all the text, add the new stuff on the end, put it back into > the control then format it all as this will be really slow :) It's for > a chat log... > > Also, anyone know what message you need to send to a richedit to make > it scroll to the bottom, and also how to find out where it is > currently scrolled to? > > Thanks :) > > Thomas Parslow (PatRat) ICQ #:26359483 > Rat Software > http://www.rat-software.com/ > Please leave quoted text in place when replying > Haven't played with rich edit controls lately but you can get the current scroll position by sending an EM_GETSCROLLPOS message (http://msdn.microsoft.com/library/psdk/winui/richedit_8aib.htm) You might use EM_SETSCROLLPOS to scroll to the bottom (after you figure out where the bottom is). I'd just go to the URL above and click on "show toc" to look through the different messages and mess around until I figured it out. Sorry I don't have all of your answers but you've got a resource in case nobody else knows off hand... -- Brian