imtiazahmad
asked on
How to make Dialog based app to Modeless
I want to make the AppWizard created dialog based application into modeless dialog based application. I've created the dialog using create function it is creating the dialog and displaying the dialog but it is not been persisted but it is closing the application immediately. How to the retain the application from closing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hmm have you set the main window to be that of your modeless dialog (see pseudo code)
CYourApp::InitInstance()
{
....
// create modeless dialog
CModeless *pWnd=new CModeless;
pWnd->Create(...);
m_pMainWnd = pWnd;
return TRUE;
}
CYourApp::InitInstance()
{
....
// create modeless dialog
CModeless *pWnd=new CModeless;
pWnd->Create(...);
m_pMainWnd = pWnd;
return TRUE;
}
ASKER
I tried with returning TRUE. The application is being terminated due to this.