1.现在看了点孙鑫MFC的视频,发现都是介绍单文档应用程序的,没有多文档应用程序,学了点单文档,但还是不知道MFC多文档应用程序怎么编程,大家有没有好的教材介绍MFC多文档编程的,推荐下
2.多文档编程默认的程序,一开始就会出现个空白doc 视图,怎么消除请大家不吝赐教!
2.多文档编程默认的程序,一开始就会出现个空白doc 视图,怎么消除请大家不吝赐教!
解决方案 »
- 高手进---0xC0000008: An invalid handle was specified
- 在主窗口中为什么获取不到子窗口指针?
- 编译没有错误,调试时报错: 无法启动程序“C:Projects\Driver\mydriver_check\HelloDDk.sys
- 大家来许个愿吧,也许会如愿哦!
- 求教摄像头循迹智能车图像处理——由边沿线求中心线
- 如何对List Control中选定的某一行进行修改?(在线给分)
- 为什么这样攻击微软??
- 三维图形平移时,矩阵相乘时用的数学原理?
- vc++连接数据库,为什么会出错,就几行代码,写
- winsock中bind()问题
- 简单的问题,dll不能register
- 探讨列表视图类CListView与CMainFrame类的关系
如下红色部分:
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo); cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;第一个就要多看网络资料了.
{
AfxEnableControlContainer(); // 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.#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif // Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
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. CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_MY111TYPE,
RUNTIME_CLASS(CMy111Doc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMy111View));
AddDocTemplate(pDocTemplate); // create main MDI Frame window
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
m_pMainWnd = pMainFrame; // 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 main window has been initialized, so show and update it.
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow(); return TRUE;
}