본문 바로가기

Programming/MFC

CSplitterWnd::CreateView

출처 내공 수련중..나에게 용기를.. | 논스모커
원문 http://blog.naver.com/ttcoupe/20018368980


MFC Library Reference
 

CSplitterWnd::CreateView

Creates the panes for a static splitter window.

//정적인 분할 윈도우를 위한 pane을 생성한다. pane이란..--; 하나의 창이라고보면 되나요?--

virtualBOOLCreateView(introw,intcol,CRuntimeClass*pViewClass,SIZEsizeInit,CCreateContext*pContext);

Parameters

row
Specifies the splitter window row in which to place the new view.
//몇번째 줄(row)에 새로운 뷰창을 위치시킬 것인가를 알려줌.
col
Specifies the splitter window column in which to place the new view.
//몇번째 줄(column)에 새로운 뷰창을 우치시킬 것인가를 알려줌.
pViewClass
Specifies theCRuntimeClassof the new view.
//새로운 창의 CRuntimeClass를 지정한다.-- 밑의 예제를 보자..
sizeInit
Specifies the initial size of the new view.
//크기를 지정함.
pContext
A pointer to a creation context used to create the view (usually thepContextpassed into the parent frame's overriddenCFrameWnd::OnCreateClientmember function in which the splitter window is being created).//뭐...흠..그냥..뭐...부모 윈도우에서 넘어온걸 그대로 쓰네요.--

Return Value

Nonzero if successful; otherwise 0.

//성공이면 0이 아닌값. 그렇지 않고 실패하면 0을 반환.

Remarks

All panes of a static splitter window must be created before the framework displays the splitter.//정적인 분할 윈도우의 모든 pane은 프레임워크가 분할윈도우를 표시하기전에 생성되어야한다. 흠..--

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 windowBOOL CChildFrame::OnCreateClient( LPCREATESTRUCT lpcs, CCreateContext* pContext){ BOOL bCreateSpltr = m_wndSplitter.CreateStatic( this, 2, 1); // COneView and CAnotherView are user-defined views derived from CMDIViewm_wndSplitter.CreateView(0,0,RUNTIME_CLASS(COneView), CSize(0,0), pContext); m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CAnotherView), CSize(0,0), pContext); //CreateView 예제입니다.return (bCreateSpltr);}

See Also

CSplitterWnd Overview|Class Members|Hierarchy Chart|CSplitterWnd::Create