CMDIChildWnd::Create

BOOL Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW, const RECT& rect = rectDefault, CMDIFrameWnd* pParentWnd = NULL, CCreateContext* pContext = NULL );

Return Value

Nonzero if successful; otherwise 0.

Parameters

lpszClassName

Points to a null-terminated character string that names the Windows class (a WNDCLASS structure). The class name can be any name registered with the AfxRegisterWndClass global function. Should be NULL for a standard CMDIChildWnd.

lpszWindowName

Points to a null-terminated character string that represents the window name. Used as text for the title bar.

dwStyle

Specifies the window style attributes. The WS_CHILD style is required. 

rect

Contains the size and position of the window. The rectDefault value allows Windows to specify the size and position of the new CMDIChildWnd.

pParentWnd

Specifies the window’s parent. If NULL, the main application window is used.

pContext

Specifies a CCreateContext structure. This parameter can be NULL.

Remarks

Call this member function to create a Windows MDI child window and attach it to the CMDIChildWnd object.

The currently active MDI child frame window can determine the caption of the parent frame window. This feature is disabled by turning off the FWS_ADDTOTITLE style bit of the child frame window.

The framework calls this member function in response to a user command to create a child window, and the framework uses the pContext parameter to properly connect the child window to the application. When you call Create, pContext can be NULL.

CMDIChildWnd OverviewClass MembersHierarchy Chart

See Also   CMDIChildWnd::CMDIChildWnd, CWnd::PreCreateWindow