LRESULT OnRecordServerInfo(WPARAM wParam,LPARAM lParam)
{
CString str=(LPCTSTR)lParam;
int nLine=m_logMsgEdit.GetLineCount();
int nStart= m_logMsgEdit.LineIndex(nLine);
m_logMsgEdit.SetSel(nStart,str.GetLength()+nStart);
m_logMsgEdit.ReplaceSel("\r\n"+str);
  return 0L;
}
我通过SetSel让光标在最后一行来显示信息,但当我点击上面的时候,光标放到上面,显示的信息就乱了,有什么办法解决吗?