6)如果要响应Rich Edit控件的OnEnChange事件, 需要在OnInitDialog()中添加 //CRichEditCtrl().SetEventMask(ENM_CHANGE); GetDlgItem
效果图: //CGEditorDlg成员 public: CString m_filename;//打开文件名 CRichEditCtrl m_richedit;//富文本框控件 CString OnEnChangeRichedit() { // TODO: 如果该控件是 RICHEDIT 控件,它将不 // 发送此通知,除非重写 CDialogEx::OnInitDialog() // 函数并调用 CRichEditCtrl
// send this notification unless you override the CDialog::OnInitDialog() // function and call CRichEditCtrl