1. Adding text to a richedit control
- Posted by "Thomas Parslow (PatRat)" <patrat at rat-software.com> Apr 12, 2001
- 512 views
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
2. Re: Adding text to a richedit control
- Posted by Jason <mirwalds at swbell.net> Apr 13, 2001
- 523 views
In my chat thingy I used a EM_EXSETSEL to set the selected text to the end, then EM_REPLACESEL to place it in the control. EM_GETLINECOUNT can be used before and after to determine how much to scroll the window (or where to scroll it to). I used EM_LINESCROLL to scroll the text, EM_SETCHARFORMAT and EM_SETPARAFORMAT to control it's appearance. ----- Original Message ----- From: Thomas Parslow (PatRat) <patrat at rat-software.com> Subject: Adding text to a richedit control > > > 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 > > > > > >