说的可能不够详细,不过你可以这样做:新建一个MFC应用程序,选择单文档,将样式设置为 Windows 资源管理器 ,然后生成代码,你就可以看到了相关的代码。不明白你到底错在何处。
但是这样的话会导致很多错误的啊,不知道为什么?? ----------------------------------------------- You should add the head file:afxcview.h to your stdafx.h file!#include <afxcview.h>-------------------------- 用CTreeView作为左边的分割窗口就行了
-----------------------------------------------
You should add the head file:afxcview.h to your stdafx.h file!#include <afxcview.h>--------------------------
用CTreeView作为左边的分割窗口就行了
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
CCreateContext* pContext)
{
if(!m_wndTree.Create(WS_CHILD | WS_VISIBLE, CRect(0, 0, 0, 0),
&m_wndSplitter, m_wndSplitter.IdFromRowCol(0, 0)))
{
TRACE("Failed to create tree.");
return FALSE;
} if(!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CContentView),
CSize(100, 100), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
} return TRUE;
}