irl like textoutput ..
-
i know, i have posted this question some days ago ... but this example : CHARRANGE cr; cr.cpMax = LONG_MAX; cr.cpMin = LONG_MAX; richedit.SetSel( cr ); // move selection to the bottom richedit.ReplaceSel( (LPCSTR)string ); // insert your text // force the rich edit to scroll to the bottom richedit.SendMessage( SB_BOTTOM, NULL, NULL ); doesn't work correctly. (for richedit) Maybe anybody else knows, how ara many clients prints channel text (mIRC, Client, etc... ) it would be better give some examples (full sources of small exampl-programs) ... thanks ---------------------------- never stop coding.
-
i know, i have posted this question some days ago ... but this example : CHARRANGE cr; cr.cpMax = LONG_MAX; cr.cpMin = LONG_MAX; richedit.SetSel( cr ); // move selection to the bottom richedit.ReplaceSel( (LPCSTR)string ); // insert your text // force the rich edit to scroll to the bottom richedit.SendMessage( SB_BOTTOM, NULL, NULL ); doesn't work correctly. (for richedit) Maybe anybody else knows, how ara many clients prints channel text (mIRC, Client, etc... ) it would be better give some examples (full sources of small exampl-programs) ... thanks ---------------------------- never stop coding.
-
sorry, the topic is "irc like textoutput" ... nevermind .. ---------------------------- never stop coding.
You could try this
// strMessage is the text you want to send to the edit control
CString strRecvd;
m_cRichEdit.GetWindowText(strRecvd);if(strRecvd.IsEmpty())
m_wndMonitor.SetWindowText(strMessage);
else if(!strRecvd.Right(1).CompareNoCase("\n"))
m_cRichEdit.SetWindowText(strRecvd + strMessage);
else
m_cRichEdit.SetWindowText(strRecvd +"\n"+ strMessage );// Scroll the line down
m_cRichEdit.SetSel(-1, -1);
m_cRichEdit.SendMessage(EM_SCROLLCARET);Hope it helps Rob