MFC点击子对话框的编辑框弹出一个窗口
顾小白xx 2012-07-26 12:03:36 怎么解决呢,我看了在编辑框的消息里没有处理鼠标的单击消息,有人说用
BOOL CMyEdit::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if (pMsg->message == WM_LBUTTONDOWN)
{
HWND hWnd = ::GetFocus();
int iID=::GetDlgCtrlID(hWnd);
if(iID==IDC_EDIT1)
{
AfxMessageBox(_T("1"));
}
else if(iID==IDC_EDIT2)
{
AfxMessageBox(_T("2"));
}
}
return CEdit::PreTranslateMessage(pMsg);
}
可是没反应
我是在编辑框的的主窗口处理的不知道那里错了