我的程序是这样的,我想先显示一个对话框,让用户选择一个文本,然后再显示主界面用来显示用户选择的文本内容,我用的是MFC的文档-视图结构,我把显示对话框的代码放在了最前面,现在有一个问题:我关闭对话框后主界面是处于最小化显示的,怎么才能在关闭对话框窗口后让主界面正常显示?
BOOL CGxyApp::InitInstance()
{
          
         // Standard initialization
// If you are not using these features and wish to reduce the size
//  of your final executable, you should remove from the following
//  the specific initialization routines you do not need. // Change the registry key under which our settings are stored.
// You should modify this string to be something appropriate
// such as the name of your company or organization.

     
     //在这里显示对话框         CDialogAll a;
a.DoModal(); SetRegistryKey(_T("Local AppWizard-Generated Applications")); LoadStdProfileSettings();  // Load standard INI file options (including MRU)
// Register the application's document templates.  Document templates
//  serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CGxyDoc),
RUNTIME_CLASS(CMainFrame),       // main SDI frame window
RUNTIME_CLASS(CGxyView));
AddDocTemplate(pDocTemplate); // Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo); // Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
    
// The one and only window has been initialized, so show and update it.
  
         m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED );
m_pMainWnd->UpdateWindow(); return TRUE;
}