ボタンをクリックするとDialogを呼び出す非常に単純なMFCアプリケーションを作成し、5秒後にMessageBoxを送信します。Windows Mobileでダイアログが閉じない
問題は、私が2番目のダイアログに入っていて、親からMessageBoxを却下したときです(2番目のダイアログの空白部分をクリックします)。ダイアログ)をクリックして、OKまたはCANCELボタンをクリックします。
なぜですか?コードの
パート:
Main Dlg: BOOL Cmult_rc_testDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon SetTimer(1, 5000, NULL); return TRUE; // return TRUE unless you set the focus to a control } void Cmult_rc_testDlg::OnBnClickedButton1() { CDlg1 a; a.DoModal(); } void Cmult_rc_testDlg::OnTimer(UINT_PTR nIDEvent) { KillTimer(nIDEvent); MessageBox(L"oi"); CDialog::OnTimer(nIDEvent); }
二ダイアログがMFCウィザードによって生成されるデフォルトのコードです。