CWindow::Create

HWND Create( LPCTSTR lpstrWndClass, HWND hWndParent, RECT& rcPos, LPCTSTR szWindowName = NULL, DWORD dwStyle = 0, DWORD dwExStyle = 0, UINT nID = 0, LPVOID lpCreateParam = NULL )

HWND Create( LPCTSTR lpstrWndClass, HWND hWndParent, LPRECT lpRect = NULL, LPCTSTR szWindowName = NULL, DWORD dwStyle = 0, DWORD dwExStyle = 0, HMENU hMenu = NULL, LPVOID lpCreateParam = NULL )

Return Value

If successful, the handle to the newly created window, specified by m_hWnd. Otherwise, NULL.

Parameters

lpstrWndClass

[in] A pointer to the window's class.

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 0, meaning no style is specified. 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 is specified. For a list of possible values, see CreateWindowEx in the Win32 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.

hMenu

A handle to the window's menu.

lpCreateParam

A pointer to the window-creation data contained in a CREATESTRUCT structure.

Remarks

Creates a window. See CreateWindow in the Platform SDK for more information.

CWindow OverviewClass Members

See Also

CWindow::m_hWnd