//响应键盘按键(在noteRichEdit框中按回车键换行) BOOL CAddMarkDlg::PreTranslateMessage(MSG* pMsg) { if(pMsg->message == WM_KEYDOWN) { if(pMsg->wParam == VK_RETURN) { m_markEditNote.SetSel(-1,-1); m_markEditNote.ReplaceSel(_T("\n")); m_markEditNote.SetFocus(); return true; } } return false; }