1 out of 3 rated this helpful - Rate this topic

WM_NCCREATE message

Applies to: desktop apps only

Sent prior to the WM_CREATE message when a window is first created.

A window receives this message through its WindowProc function.

#define WM_NCCREATE                     0x0081

Parameters

wParam

This parameter is not used.

lParam

A pointer to the CREATESTRUCT structure that contains information about the window being created. The members of CREATESTRUCT are identical to the parameters of the CreateWindowEx function.

Return value

Type: LRESULT

If an application processes this message, it should return TRUE to continue creation of the window. If the application returns FALSE, the CreateWindow or CreateWindowEx function will return a NULL handle.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

See also

Reference
CreateWindow
CreateWindowEx
DefWindowProc
CREATESTRUCT
WM_CREATE
Conceptual
Windows

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Behaviour on DWM Windows
On Windows 7 if you handle WM_NCCREATE and return 1 to indicate success to the OS and CreateWindowEx() was called with a caption string, the caption is not set. Returning DefWindowProc() instead works.

Added 12/07/2011 - @MSFT This is a BUG and contrary to the documentation above, please would you fix it.
Value
WM_NCCREATE = &H81