how to make my rich edit ctrl scroll automatically when insert new text?
here's how i insert text
Code:
msg.Insert( msg.GetLength() , "\n");
m_system_message.SetSel(-1,-1);
m_system_message.ReplaceSel(msg);
here's how the richedit is defined in the resource file
Code:
CONTROL "",IDC_SYSTEM_MESSAGE,"RICHEDIT",ES_MULTILINE |
ES_AUTOVSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP,11,
257,241,52
as you guys can see, ES_AUTOVSCROLL is definately there
but whenever i insert new text using ReplaceSel, the text focus is always at the top. how do i make it such that it automatically scrolls down to read the latest text inserted?
using
- mfc
- vc6.0
- winxp
thanks in advance!