OK, I think the best thing would be to not make it modal then. Make it a member of your app's class (a pointer)
Code:
CMyDialog* m_pDlg;
then in your initinstance do something like this:
Code:
m_pDlg = new CMyDialog;
m_pDlg->Create(IDD_MYDIALOG,this);
m_pDlg->ShowWindow(SW_HIDE);
instead of the call to DoModal and declaring it as a local variable. Make sure it's public so that anywhere in your code you can reference it by (theApp.m_pDlg). Just make sure you delete it in your app's InitInstance function.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.