MFC 程序来龙去脉_子文档3
MFC 程序来龙去脉_子文档 3
探究 pApp->InitApplication()
查看 CWinApp::InitApplication() 源码:
BOOL CWinApp::InitApplication()
{
if (CDocManager::pStaticDocManager != NULL)
{
if (m_pDocManager == NULL)
m_pDocManager = CDocManager::pStaticDocManager;
CDocManager::pStaticDocManager = NULL;
}
if (m_pDocManager != NULL)
m_pDocManager->AddDocTemplate(NULL);
else
CDocManager::bStaticInit = FALSE;
LoadSysPolicies();
return TRUE;
}
总结:以上代码为 MFC 内部结构(Doc/View)而做,暂时不用关心。