
2nd Dialog never appears in Dialog based app
Within my CDialog based app, in CMyApp::InitIntance() I am attempting to:
1 - display primary dialog1
2 - evalute return value (IDCANCEL or IDOK)
3 - Display another CDialog based window (dialog2)
4 - Call CMyApp::ExitInstance()
Step 3 FAILS without ever displaying the window.
Step 3 involes:
Instantiating the instance...
CDialog2 Dialog2 ;
and then calling Dialog2.DoModal() ;
The DoModal returns immediately without ever displaying the dialog. In the
debug, no ASSERTS are thrown. The Dialog2 resource attributes are defined
in the resource file (.rc) and resource.h.
The Resources compile to the .res file without any problems. I ensured that
the CDialog2 definition uses the correct resourceID. You should know that
the hwnd member of CDialog2 is set to NULL when run in the de{*filter*}. What's
going on here? Do I need to:
Instantiate CDialog2 from with the previous Dialog1's OnOK() member?
reset the CMyApp->m_pMainWnd to Dialog2?
directly call CreateWindow with the Dialog2 parameters?
-Apex