CSplitterWnd::CreateView
The document is archived and information here might be outdated

CSplitterWnd::CreateView 

Creates the panes for a static splitter window.


virtual BOOL CreateView(
   int row,
   int col,
   CRuntimeClass* pViewClass,
   SIZE sizeInit,
   CCreateContext* pContext 
);

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).

Nonzero if successful; otherwise 0.

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.

// 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);
}
Show:
© 2016 Microsoft