在Edi控件响应单击事件创建t对话框问题

我在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);

}

那个我查了下PreTranslateMessage函数,然候试着在if{}里面加了条代码return TRUE;然后就不会崩溃了

调试下你的程序,对话框返回的代码有没有问题