Dlg's;
-
How come this code fails with the ATLASSERT( ::IsWindow(m_hWnd) );? This code is in my CMainFrame and I'm tring to show a dialog. CPrintDialog dlg(FALSE); ... TCHAR sTitle[_MAX_FNAME] = {0}; AtlLoadString( IDR_MAINFRAME, sTitle, _MAX_FNAME ); dlg.SetWindowText( sTitle );error here // Show it Thank You Bo Hunter
-
How come this code fails with the ATLASSERT( ::IsWindow(m_hWnd) );? This code is in my CMainFrame and I'm tring to show a dialog. CPrintDialog dlg(FALSE); ... TCHAR sTitle[_MAX_FNAME] = {0}; AtlLoadString( IDR_MAINFRAME, sTitle, _MAX_FNAME ); dlg.SetWindowText( sTitle );error here // Show it Thank You Bo Hunter
The dialog (and thus its controls) aren't created until you call
DoModal()
. You need to set the text inOnInitDialog()
. --Mike-- Ericahist [updated Oct 26] | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber Pinky, are you pondering what I'm pondering? I think so Brain, but if we shaved our heads, we'd look like weasels!