我在Edit控件中响应单击事件然后创建模态对话框,可是关闭模态对话框的时候程序就崩溃了
代码如下:
BOOL CBolg1Dlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
/*if (pMsg->hwnd == m_edit4.m_hWnd && pMsg->message == WM_LBUTTONDBLCLK)
{
MessageBox(_T("响应单击事件!"));
}*/
if (pMsg->hwnd == m_edit4.m_hWnd && pMsg->message == WM_LBUTTONDOWN)
{
MyDelecar myDel;
myDel.DoModal();
}
return CDialog::PreTranslateMessage(pMsg);
}