|
A class derived from CTreeView, such as CLeftView, can display tree controls.
Add a member in the CMainFrame class
CSplitterWnd m_wndSplitter;
Implement CMainFrame::OnCreateClient() method, part of the code:
// TODO: create split view
if (!m_wndSplitter.CreateStatic(this, 1, 2))
{
TRACE0("Failed to CreateStaticSplitter\n");
return FALSE;
}
// add-an input view in column 1
if (!m_wndSplitter.CreateView(0, 0,
RUNTIME_CLASS(CLeftView), CSize(170, 0), pContext))
{
TRACE0("Failed to create second pane\n");
return FALSE;
}
// Add another view using the same method
// activate the input view
SetActiveView((CView*)m_wndSplitter.GetPane(0,1)); |
|