Win32 Edit Control Help,
Members - Reputation: 165
Posted 06 December 2012 - 01:10 AM
So my question is, how would I go about fixing this or is there a better way to make the chat window portion then using an edit control window?
Crossbones+ - Reputation: 5120
Posted 06 December 2012 - 01:55 AM
Better than using SetWindowText to replace the full text:
You can add text by setting the beginning and end of the selection to the end of the text in the control (EM_SETSEL), then replacing the (empty) selection with your new text (EM_REPLACESEL).
Scrolling to the bottom can be done with EM_SCROLLCARET after the caret (the selection) is at the end of the text. There are other ways, but if you're doing it immediately after adding text, this is probably the easiest.