closing MFC dialog app
-
i have an app with a login dialog box, with login button, when the button is pressed the login dialog box hides and new dialog box opens. When i click cancel in the new main dialog box, the dialog box disappears but the app is still running in the background in taskmanager. is it becuase the login dialog box is hidden and not closed or ??? how do i close the hidden dialog box if that is the problem or is it summit else? regards keith void CKeithDlg::OnLogin() { ShowWindow(SW_HIDE); CMainDlg Dlg; Dlg.DoModal(); } ======================================== void CMainDlg::OnCancel() { CDialog::OnCancel(); }
-
i have an app with a login dialog box, with login button, when the button is pressed the login dialog box hides and new dialog box opens. When i click cancel in the new main dialog box, the dialog box disappears but the app is still running in the background in taskmanager. is it becuase the login dialog box is hidden and not closed or ??? how do i close the hidden dialog box if that is the problem or is it summit else? regards keith void CKeithDlg::OnLogin() { ShowWindow(SW_HIDE); CMainDlg Dlg; Dlg.DoModal(); } ======================================== void CMainDlg::OnCancel() { CDialog::OnCancel(); }
CKeithDlg
hides itself but doesn't close itself, so the app is running with a hidden main window. IIUC you want the app to exit afterCMainDlg
closes, right? At the end ofCKeithDlg::OnLogin()
, addEndDialog(IDOK);
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ -
CKeithDlg
hides itself but doesn't close itself, so the app is running with a hidden main window. IIUC you want the app to exit afterCMainDlg
closes, right? At the end ofCKeithDlg::OnLogin()
, addEndDialog(IDOK);
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQthanks, that did it
-
i have an app with a login dialog box, with login button, when the button is pressed the login dialog box hides and new dialog box opens. When i click cancel in the new main dialog box, the dialog box disappears but the app is still running in the background in taskmanager. is it becuase the login dialog box is hidden and not closed or ??? how do i close the hidden dialog box if that is the problem or is it summit else? regards keith void CKeithDlg::OnLogin() { ShowWindow(SW_HIDE); CMainDlg Dlg; Dlg.DoModal(); } ======================================== void CMainDlg::OnCancel() { CDialog::OnCancel(); }
void CKeithDlg::OnLogin() { ShowWindow(SW_HIDE); CMainDlg Dlg; Dlg.DoModal(); EndDialog(IDOK); } Manish Rastogi