15,979
社区成员
发帖
与我相关
我的任务
分享
void CCancelModeDlg::OnSetfocusEdit1()
{
if(!FindWindow(0,"xxx"))
{
::MessageBox(m_Edit1.m_hWnd,"SetfocusEdit1","xxx",MB_OK);
// w.o this the cursor is 'I' anywhere ,means focus in edit1 !!!
// mouse has captured by edit1
m_Edit1.PostMessage(WM_CANCELMODE,0,0);
}
}
void CCancelModeDlg::OnSetfocusEdit2()
{
if(!FindWindow(0,"yyy"))// change : AFX_IDS_APP_TITLE="yyy"
{
AfxMessageBox("SetfocusEdit2");
// w.o this the cursor is 'I' anywhere ,means focus in edit2 !!!
// mouse has captured by edit2
m_Edit2.PostMessage(WM_CANCELMODE,0,0);
}
}