// Set the event mask so that the parent gets notified when the text // of the rich edit control changes. pmyRichEditCtrl->SetEventMask(pmyRichEditCtrl->GetEventMask() | ENM_CHANGE);怎么不看MSDN,下面是MSDN中列出的ENM_CHANGE Sends EN_CHANGE notifications.ENM_CORRECTTEXT Sends EN_CORRECTTEXT notifications.ENM_DRAGDROPDONE Sends EN_DRAGDROPDONE notifications.ENM_DROPFILES Sends EN_DROPFILES notifications.ENM_IMECHANGE Microsoft® Rich Edit 1.0 only: Sends EN_IMECHANGE notifications when the IME conversion status has changed. Only for Asian-language versions of the operating system.ENM_KEYEVENTS Sends EN_MSGFILTER notifications for keyboard events.ENM_LINK Rich Edit 2.0 and later: Sends EN_LINK notifications when the mouse pointer is over text that has the CFE_LINK and one of several mouse actions is performed.ENM_MOUSEEVENTS Sends EN_MSGFILTER notifications for mouse events.ENM_OBJECTPOSITIONS Sends EN_OBJECTPOSITIONS notifications.ENM_PROTECTED Sends EN_PROTECTED notifications.ENM_REQUESTRESIZE Sends EN_REQUESTRESIZE notifications.ENM_SCROLL Sends EN_HSCROLL and EN_VSCROLL notifications.ENM_SCROLLEVENTS Sends EN_MSGFILTER notifications for mouse wheel events.ENM_SELCHANGE Sends EN_SELCHANGE notifications.ENM_UPDATE Sends EN_UPDATE notifications. Rich Edit 2.0 and later: this flag is ignored and the EN_UPDATE notifications are always sent. However, if Rich Edit 3.0 emulates Rich Edit 1.0, you must use this flag to send EN_UPDATE notifications.
m_RichEdit.SetEventMask( m_RichEdit.GetEventMask() | ENM_CHANGE );
// of the rich edit control changes.
pmyRichEditCtrl->SetEventMask(pmyRichEditCtrl->GetEventMask() |
ENM_CHANGE);怎么不看MSDN,下面是MSDN中列出的ENM_CHANGE
Sends EN_CHANGE notifications.ENM_CORRECTTEXT
Sends EN_CORRECTTEXT notifications.ENM_DRAGDROPDONE
Sends EN_DRAGDROPDONE notifications.ENM_DROPFILES
Sends EN_DROPFILES notifications.ENM_IMECHANGE
Microsoft® Rich Edit 1.0 only: Sends EN_IMECHANGE notifications when the IME conversion status has changed. Only for Asian-language versions of the operating system.ENM_KEYEVENTS
Sends EN_MSGFILTER notifications for keyboard events.ENM_LINK
Rich Edit 2.0 and later: Sends EN_LINK notifications when the mouse pointer is over text that has the CFE_LINK and one of several mouse actions is performed.ENM_MOUSEEVENTS
Sends EN_MSGFILTER notifications for mouse events.ENM_OBJECTPOSITIONS
Sends EN_OBJECTPOSITIONS notifications.ENM_PROTECTED
Sends EN_PROTECTED notifications.ENM_REQUESTRESIZE
Sends EN_REQUESTRESIZE notifications.ENM_SCROLL
Sends EN_HSCROLL and EN_VSCROLL notifications.ENM_SCROLLEVENTS
Sends EN_MSGFILTER notifications for mouse wheel events.ENM_SELCHANGE
Sends EN_SELCHANGE notifications.ENM_UPDATE
Sends EN_UPDATE notifications.
Rich Edit 2.0 and later: this flag is ignored and the EN_UPDATE notifications are always sent. However, if Rich Edit 3.0 emulates Rich Edit 1.0, you must use this flag to send EN_UPDATE notifications.
m_ctlRichEdit.SetEventMask(m_ctlRichEdit.GetEventMask() | ENM_CHANGE);
其中参数的各种含义楼上的已经给列出来了,参考一下!祝你成功!