主题:[讨论]SDI程序窗口的创建
在MDI程序里主窗口框架的创建是用 CMainFrame* pMainFrame = new CMainFrame;
而在SDI中没有new CMainFrame类的对象,那么主窗口框架是在下面哪里创建出来的呢?
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CMfcDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CMfcView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
还望高人指点.
而在SDI中没有new CMainFrame类的对象,那么主窗口框架是在下面哪里创建出来的呢?
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CMfcDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CMfcView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
还望高人指点.