CContainedWindow::Create

HWND Create( HWND hWndParent, RECT& rcPos, LPCTSTR szWindowName = NULL, DWORD dwStyle = WS_CHILD | WS_VISIBLE, DWORD dwExStyle = 0, UINT nID = 0 );

Return Value

If successful, the handle to the newly created window; otherwise, NULL.

Parameters

hWndParent

[in] The handle to the parent or owner window.

rcPos

[in] A RECT structure specifying the position of the window.

szWindowName

[in] Specifies the name of the window. The default value is NULL.

dwStyle

[in] The style of the window. The default value is WS_CHILD | WS_VISIBLE. For a list of possible values, see CreateWindow in the Platform SDK.

dwExStyle

[in] The extended window style. The default value is 0, meaning no extended style. For a list of possible values, see CreateWindowEx in the Platform SDK.

nID

[in] For a child window, the window identifier. For a top-level window, an HWND casted to a UINT. The default value is 0.

Remarks

Calls RegisterWndSuperclass to register a window class that is based on an existing class but uses CContainedWindow::WindowProc. The existing window class name is saved in m_lpszClassName. Create then creates a window based on this new class. The newly created window is automatically attached to the CContainedWindow object.

Note   Do not call Create if you have already called SubclassWindow.

CContainedWindow OverviewClass Members

See Also

CWindow::m_hWnd