在书上P344有:
CDocument * CMultiDocTemplate::OpenDocumentFile(LPCTSTR lpszPathName,BOOL
bMakeVisible)
{
CDocument * pDocument = CreateNewDocument();
...
CFrameWnd * pFrame = CreateNewFrame(pDocument, NULL);
...
..
}P345页有:
CFrameWnd * CDocTemplate::CreateNewFrame(CDocument * pDoc,CFrameWnd *
pOther)
{
CCreateContext context;
context.m_pCurrentFrame = pOther; //这里pOther 是NULL啊
context.m_pCurrentDoc = pDoc;
.....}问题是: pOther 是NULL, 那么往后构建CView的时候,没有Frame可以吗?
CDocument * CMultiDocTemplate::OpenDocumentFile(LPCTSTR lpszPathName,BOOL
bMakeVisible)
{
CDocument * pDocument = CreateNewDocument();
...
CFrameWnd * pFrame = CreateNewFrame(pDocument, NULL);
...
..
}P345页有:
CFrameWnd * CDocTemplate::CreateNewFrame(CDocument * pDoc,CFrameWnd *
pOther)
{
CCreateContext context;
context.m_pCurrentFrame = pOther; //这里pOther 是NULL啊
context.m_pCurrentDoc = pDoc;
.....}问题是: pOther 是NULL, 那么往后构建CView的时候,没有Frame可以吗?
解决方案 »
- vs2010 创建动态链接库的疑问
- vc中调用matlab com组件,函数要求参数是VARIANT型,而我需要的是一个int数组,怎么办?
- 弱弱的问下,谢谢
- 问个问题:关于多线程的?谢谢
- 请问如何在代码改vc中的标题
- ■□■初手问题-变成COM后不能识别成类了?100分求救■□■
- 如何在web中编写activeX的事件响应代码
- 在一个dialog中显示几个dialog
- 我的vc6.0安装了一个从matlab转来的com组件,但要在没装matlab的环境下运行这个程序必须把组件安装在本机上,想问一下怎么装
- 简单的CImage出错,求大神指导
- 请问怎样在数据传送到应用程序之前把它截获并修改包的内容?
- 如何实现在MFC中CScrollView类下的文档视图的放大与缩小
m_pCurrentFrame
The frame window upon which additional frame windows are modeled, as in the creation of a second frame window on a document.
这里说的很清楚了。而且msdn中关于CreateNewFrame也说到
pOtherThe frame window on which the new frame window is to be based. Can be NULL
这时候mfc应该是使用默认值吧,楼主看这么仔细啊?汗