摘要:
Login dlg; if(dlg.DoModal()!=IDOK) { OnOK(); }void Login::OnOK() { // TODO: Add extra validation here //CEdit *pEdit1 = (CEdit *)GetDlgItem(IDC_EDIT1); //CEdit *pEdit2 = (CEdit *)GetDlgItem(IDC_EDIT2); //CString e1, e2; //pEdit1->GetWindowText(e1); //pEdit2->Get... 阅读全文
摘要:
void CWelcomeDlg::OnClose() { // TODO: Add your message handler code here and/or call default if(MessageBox("Are you sure close this windows?", "closing", MB_OKCANCEL|MB_ICONQUESTION) == IDOK) { CDialog::OnClose(); } //创建一个基于对话框的应用程序. //通过类向导选择WM_CLOSE消息事件 //在对话框的消息事件... 阅读全文
摘要:
BOOL CWelcomeDlg::PreTranslateMessage(MSG* pMsg) //Called to filter messages before they are dispatched{ // TODO: Add your specialized code here and/or call the base class if(pMsg->message == WM_KEYDOWN && pMsg->wParam == 27) { CString s; s.Format("The wParam= %d The message =... 阅读全文