The WM_CREATE message is sent when an application requests that a window be created by calling the
CreateWindow or
CreateWindowEx 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.
Parameters
- wParam This parameter is not used.
- lParam Pointer to a CREATESTRUCT structure that contains information about the window being created.
Return Value
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.
Prototype for Message Handlerint on_create(HWND hwnd, LPCREATESTRUCT create_struct_pointer)
{
}
This should return 0 for success, and -1 in case of a
failure.
If you use the HANDLE_WM_CREATE macro, this function should return TRUE
for success, and FALSE for failure.