Windows mobile设置MFC确认键不退出及OnExit响应退出

BOOL CtestDlg::PreTranslateMessage(MSG* pMsg)
{
    // TODO: Add your specialized code here and/or call the base class
    if((pMsg->message==WM_KEYDOWN) && (pMsg->wParam==VK_RETURN))
                return TRUE;
    return CDialog::PreTranslateMessage(pMsg);
} 
void CtestDlg::OnExit()
{
	// TODO: 在此添加命令处理程序代码
	AfxGetMainWnd()->SendMessage(WM_CLOSE);
}

posted on 2011-03-25 10:44  lartely  阅读(519)  评论(0编辑  收藏  举报

导航