Link to home
Start Free TrialLog in
Avatar of imtiazahmad
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
Avatar of ShaunWilde
ShaunWilde

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of imtiazahmad
imtiazahmad

ASKER

It's not working
I tried with returning TRUE. The application is being terminated due to this.
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;
}