我的程序是这样的,我想先显示一个对话框,让用户选择一个文本,然后再显示主界面用来显示用户选择的文本内容,我用的是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;
}
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;
}
解决方案 »
- Bresenham算法画直线个别区域不能显示问题
- 介绍有关网络编程的书籍, 初级, 中级, 高级也可看看吗
- 通过ip 和 mac 获取局域网计算机名
- 请问客户端SOCKET如何关闭和服务端的SOCKET连接?
- 因为这个问题很菜,所以才给50分,急盼
- 我是VC++的爱好者,但不知重何入手,请高手指教!!!
- 这个问题还没有人能够解答,你敢试试吗?
- 一个SOCKET服端最多可以接受多少客户的连接?
- 求助啊 如何删除文件夹啊 100分
- 我在程序中用到了CJ6lib(象visual devstudio 的东东)但是在程序最大化最小化时,CTabCtrl不能正常显现??求教
- 喜欢COM/COM+/ALT的请加如这个群:13470240 UP者也有分!
- 请教使背景图片半透明化的方法
可以postmessage
自定义消息
告诉主窗口他关了