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 |
|
See also
- Reference
- CreateWindow
- CreateWindowEx
- DefWindowProc
- CREATESTRUCT
- WM_CREATE
- Conceptual
- Windows
Send comments about this topic to Microsoft
Build date: 2/3/2012
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.
Added 12/07/2011 - @MSFT This is a BUG and contrary to the documentation above, please would you fix it.
- 2/25/2011
- mcaizcm3
- 7/12/2011
- Thomas Lee