CRichEditCtrl SetEventMask problem
-
Hi all, i've created this class that inherites from CRichEditCtrl:
CMyRichEditCtrl::CMyRichEditCtrl()
{
}CMyRichEditCtrl::~CMyRichEditCtrl()
{
}void CMyRichEditCtrl::PreSubclassWindow()
{
CRichEditCtrl::PreSubclassWindow();
SetAutoURLDetect();
SetEventMask(ENM_CHANGE | ENM_LINK);
}BEGIN_MESSAGE_MAP(CMyRichEditCtrl, CRichEditCtrl)
ON_NOTIFY_REFLECT(EN_LINK, &CMyRichEditCtrl::OnRichEditLink)
ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)
END_MESSAGE_MAP()void CMyRichEditCtrl::OnRichEditLink(NMHDR* pNMHDR,LRESULT* pResult)
{
}void CMyRichEditCtrl::OnRichEditChange(NMHDR* pNMHDR,LRESULT* pResult)
{
}problem is that when i place a break point inside the 'OnRichEditLink' it breaks there, but when i place a break point inside the 'OnRichEditChange' it doesn't break??? can any1 help thanks in advanced Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
-
Hi all, i've created this class that inherites from CRichEditCtrl:
CMyRichEditCtrl::CMyRichEditCtrl()
{
}CMyRichEditCtrl::~CMyRichEditCtrl()
{
}void CMyRichEditCtrl::PreSubclassWindow()
{
CRichEditCtrl::PreSubclassWindow();
SetAutoURLDetect();
SetEventMask(ENM_CHANGE | ENM_LINK);
}BEGIN_MESSAGE_MAP(CMyRichEditCtrl, CRichEditCtrl)
ON_NOTIFY_REFLECT(EN_LINK, &CMyRichEditCtrl::OnRichEditLink)
ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)
END_MESSAGE_MAP()void CMyRichEditCtrl::OnRichEditLink(NMHDR* pNMHDR,LRESULT* pResult)
{
}void CMyRichEditCtrl::OnRichEditChange(NMHDR* pNMHDR,LRESULT* pResult)
{
}problem is that when i place a break point inside the 'OnRichEditLink' it breaks there, but when i place a break point inside the 'OnRichEditChange' it doesn't break??? can any1 help thanks in advanced Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
ok i found what the problem was, instead of catching
ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)
i should have caught
ON_CONTROL_REFLECT(EN_CHANGE,OnRichEditChange)
thanks anyways cheers Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)