- Close the Enter response of Edit Control
Rewrite the OnOk() method of the corresponding modal box
void CLoginDlg::OnOK()
{
// TODO: 在此添加专用代码和/或调用基类
//CDialogEx::OnOK();
}
- Modify the response event of the window's default close button
Add the corresponding window's message WM_CLOSE response function OnClose()
void CLoginDlg::OnClose()
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
exit(0);
//CDialogEx::OnClose();
}