15,979
社区成员
发帖
与我相关
我的任务
分享
//我建立了一个mfc dlg,然后添加了一个CMyButton类
void CMyButton::OnLButtonDown(UINT nFlags, CPoint point)
{
//::MessageBox(NULL,NULL,"3245ytrew",0);//如果放这里,dlg就获取不了焦点,导致无论点什么键都 一直响应此消息,dlg也关闭了不了??!!
CButton::OnLButtonDown(nFlags, point);
::MessageBox(NULL,NULL,"3245ytrew",0);//放这里就正常,为什么呢?
}
void CMyBtn::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
AfxMessageBox(_T("ok"));
//可以在这里加断点调试
CButton::OnLButtonDown(nFlags, point);
}