WM_CREATE message

Sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created, but before the window becomes visible.

A window receives this message through its WindowProc function.

#define WM_CREATE                       0x0001

Parameters

wParam

This parameter is not used.

lParam

A pointer to a CREATESTRUCT structure that contains information about the window being created.

Return value

Type: LRESULT

If an application processes this message, it should return zero to continue creation of the window. If the application returns –1, the window is destroyed and the CreateWindowEx or CreateWindow function returns a NULL handle.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Reference

CreateWindow

CreateWindowEx

CREATESTRUCT

WM_NCCREATE

Conceptual

Windows