试试 EN_MSGFILTER 看看The EN_MSGFILTER message notifies a rich edit control's parent window of a keyboard or mouse event in the control. A rich edit control sends this notification message in the form of a WM_NOTIFY message.
在EN_CHANGE消息响应函数中判断
EN_CHANGE消息相应函数中不知道如何获取更新的内容阿。
BOOL CTest6Dlg::OnInitDialog() { m_richedit1.SetEventMask(m_richedit1.GetEventMask() | ENM_CHANGE); }void CTest6Dlg::OnChangeRichedit1() { // TODO: If this is a RICHEDIT control, the control will not // send this notification unless you override the CDialog::OnInitDialog() // function and call CRichEditCtrl().SetEventMask() // with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
//在这里判断
}
void CTest6Dlg::OnChangeRichedit1() { // TODO: If this is a RICHEDIT control, the control will not // send this notification unless you override the CDialog::OnInitDialog() // function and call CRichEditCtrl().SetEventMask() // with the ENM_CHANGE flag ORed into the mask.// TODO: Add your control notification handler code here//在这里判断} 在这个函数体中,如何获取更新的内容,而不是所有的内容呢?
{
m_richedit1.SetEventMask(m_richedit1.GetEventMask() | ENM_CHANGE);
}void CTest6Dlg::OnChangeRichedit1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
//在这里判断
}
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.// TODO: Add your control notification handler code here//在这里判断}
在这个函数体中,如何获取更新的内容,而不是所有的内容呢?