WM_NCCREATE

2.x

WM_NCCREATE
lpcs = (CREATESTRUCT FAR*) lParam;  /* address of initialization data */

The WM_NCCREATE message is sent prior to the WM_CREATE message when a window is first created.

Parameters

lpcs

Value of lParam. Points to the CREATESTRUCT data structure for the window. 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;

Return Value

The return value is nonzero if the nonclient area is created. It is zero if an error occurs; in this case, the CreateWindow or CreateWindowEx function will return NULL.

Comments

Scroll bars are initialized (the scroll bar position and range are set), and the window text is set. Memory used internally to create and maintain the window is allocated.

See Also

CreateWindow, WM_CREATE