8 个解决方案
#1
OnKeyDown()
#2
呵呵,恐怕也不行吧
不过谢谢你顶了一把
不过谢谢你顶了一把
#3
*.h
afx_msg void OnChangeRichedit1();
*.Cpp
ON_EN_CHANGE(IDC_RICHEDIT1, OnChangeRichedit1)
void CSyDialog::OnChangeRichedit1()
{
//add your code
}
afx_msg void OnChangeRichedit1();
*.Cpp
ON_EN_CHANGE(IDC_RICHEDIT1, OnChangeRichedit1)
void CSyDialog::OnChangeRichedit1()
{
//add your code
}
#4
没有其他办法了吗?这样做对按件(up、down)都要作判断有点麻烦,CRichEditCtrl的基类CWnd中有onkeyup和onkeydown成员函数,应该可以重载吧
#5
BOOL CEMapView::PreTranslateMessage(MSG* pMsg)
{
if(GetFocus()==GetDlgItem(IDC_YOURRICHEDITID))
if(pMsg->message==WM_KEYDOWN)
...
...
return CView::PreTranslateMessage(pMsg);
}
{
if(GetFocus()==GetDlgItem(IDC_YOURRICHEDITID))
if(pMsg->message==WM_KEYDOWN)
...
...
return CView::PreTranslateMessage(pMsg);
}
#6
to zhucde
我没用视图类
我没用视图类
#7
再顶一次
#8
顶
#1
OnKeyDown()
#2
呵呵,恐怕也不行吧
不过谢谢你顶了一把
不过谢谢你顶了一把
#3
*.h
afx_msg void OnChangeRichedit1();
*.Cpp
ON_EN_CHANGE(IDC_RICHEDIT1, OnChangeRichedit1)
void CSyDialog::OnChangeRichedit1()
{
//add your code
}
afx_msg void OnChangeRichedit1();
*.Cpp
ON_EN_CHANGE(IDC_RICHEDIT1, OnChangeRichedit1)
void CSyDialog::OnChangeRichedit1()
{
//add your code
}
#4
没有其他办法了吗?这样做对按件(up、down)都要作判断有点麻烦,CRichEditCtrl的基类CWnd中有onkeyup和onkeydown成员函数,应该可以重载吧
#5
BOOL CEMapView::PreTranslateMessage(MSG* pMsg)
{
if(GetFocus()==GetDlgItem(IDC_YOURRICHEDITID))
if(pMsg->message==WM_KEYDOWN)
...
...
return CView::PreTranslateMessage(pMsg);
}
{
if(GetFocus()==GetDlgItem(IDC_YOURRICHEDITID))
if(pMsg->message==WM_KEYDOWN)
...
...
return CView::PreTranslateMessage(pMsg);
}
#6
to zhucde
我没用视图类
我没用视图类
#7
再顶一次
#8
顶