这个TreeView派生类是显示在CMainFrame里,我的目的是有分隔条后好加一个标题栏,将分隔条MoveWindows就可以了,但现在加了分隔条后,就会出现“建立空文档失败”。跟了下代码是在主线程XXApp的InitInstance里面
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
pDocTemplate->OpenDocumentFile(NULL);//此次引发异常对话框我新加分割视图的代码如下:
if ( !m_wndSplt.CreateStatic( this, 2, 1 ) )
{
            TRACE("创建失败!\n");
    return FALSE;
} if ( !m_wndSplt.CreateView( 0, 0, RUNTIME_CLASS(CNmcDeviceDirViewTree), CSize(0, 0), pContext ) )
{
TRACE("创建视图失败!\n");
m_wndSplt.DestroyWindow();
return FALSE;
} if ( !m_wndSplt.CreateView( 1, 0, RUNTIME_CLASS(CNmcDeviceDirView), CSize(0, 0), pContext ) )
{
TRACE("创建视图失败!\n");
m_wndSplt.DestroyWindow();
return FALSE;
} CNmcGUIDoc *pGUIDoc = static_cast<CNmcGUIDoc*>(pContext->m_pCurrentDoc);
pGUIDoc->m_pRightTree = this;
pGUIDoc->m_hWndDirViewTree = m_wndSplt.GetPane(0, 0)->GetSafeHwnd();
//pGUIDoc->m_hWndDirTree = m_wndSplt.GetPane(1, 0)->GetSafeHwnd(); return TRUE;