CSplitterWnd::CreateView
virtualBOOLCreateView(introw**,intcol,CRuntimeClass*pViewClass,SIZEsizeInit,CCreateContext*pContext);**
Return Value
Nonzero if successful; otherwise 0.
Parameters
row
Specifies the splitter window row in which to place the new view.
col
Specifies the splitter window column in which to place the new view.
pViewClass
Specifies the CRuntimeClass of the new view.
sizeInit
Specifies the initial size of the new view.
pContext
A pointer to a creation context used to create the view (usually the pContext passed into the parent frame’s overridden CFrameWnd::OnCreateClient member function in which the splitter window is being created).
Remarks
Call this member function to create the panes for a static splitter window. All panes of a static splitter window must be created before the framework displays the splitter.
The framework also calls this member function to create new panes when the user of a dynamic splitter window splits a pane, row, or column.
Example
// this function creates the panes for a static splitter window
BOOL CChildFrame::OnCreateClient( LPCREATESTRUCT lpcs,
CCreateContext* pContext)
{
BOOL bCreateSpltr = m_wndSplitter.CreateStatic( this, 2, 1);
// COneView and CAnotherView are user-defined views derived from CMDIView
m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(COneView), CSize(0,0),
pContext);
m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CAnotherView), CSize(0,0),
pContext);
return (bCreateSpltr);
}
CSplitterWnd Overview | Class Members | Hierarchy Chart
See Also CSplitterWnd::Create