WM_CREATE
lpcs = (CREATESTRUCT FAR*) lParam; /* structure address */
The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. The window procedure for the new window receives this message after the window is created but before the window becomes visible. The message is sent to the window before the CreateWindowEx or CreateWindow function returns.
lpcs
Value of lParam. Points to a CREATESTRUCT data structure containing information about the window being created. The members of the CREATESTRUCT structure are identical to the parameters of the CreateWindowEx function.
The CREATESTRUCT structure has the following form:
typedef struct tagCREATESTRUCT { /* cs */
void FAR* lpCreateParams;
HINSTANCE hInstance;
HMENU hMenu;
HWND hwndParent;
int cy;
int cx;
int y;
int x;
LONG style;
LPCSTR lpszName;
LPCSTR lpszClass;
DWORD dwExStyle;
} CREATESTRUCT;
If an application processes this message, it should return 0 to continue creation of the window. If the application returns –1, the window will be destroyed and the CreateWindowEx or CreateWindow function will return a NULL handle.