15,979
社区成员
发帖
与我相关
我的任务
分享
BOOL CfffApp::InitInstance()
{
/***********省略一点*******************/
// 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(CfffDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CfffView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);
/****************这里****************************/
CleanState(_T("WorkSpace"));
/****************上面***************************/
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line. Will return FALSE if
// app was launched with /RegServer, /Register, /Unregserver or /Unregister.
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized, so show and update it
m_pMainWnd->ShowWindow(SW_SHOW);
/*************这里可以设置最大化,方法上面都说过了。
m_pMainWnd-> ShowWindow(SW_SHOWMAXMIZED);
***********************************/
m_pMainWnd->UpdateWindow();
// call DragAcceptFiles only if there's a suffix
// In an SDI app, this should occur after ProcessShellCommand
return TRUE;
}
BOOL CfffApp::InitInstance()
{
/***********省略一点*******************/
// 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(CfffDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CfffView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);
CleanState(_T("WorkSpace"));
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line. Will return FALSE if
// app was launched with /RegServer, /Register, /Unregserver or /Unregister.
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized, so show and update it
m_pMainWnd->ShowWindow(SW_SHOW);
/*************这里可以设置最大化,方法上面都说过了。
m_pMainWnd-> ShowWindow(SW_SHOWMAXMIZED);
***********************************/
m_pMainWnd->UpdateWindow();
// call DragAcceptFiles only if there's a suffix
// In an SDI app, this should occur after ProcessShellCommand
return TRUE;
}