Sent to the parent of a child window when the child window is created or destroyed, or when the user clicks a mouse button while the cursor is over the child window. When the child window is being created, the system sends WM_PARENTNOTIFY just before the CreateWindow or CreateWindowEx function that creates the window returns. When the child window is being destroyed, the system sends the message before any processing to destroy the window takes place.
A window receives this message through its WindowProc function.
#define WM_PARENTNOTIFY 0x0210
The low-order word of wParam specifies the event for which the parent is being notified. The value of the high-order word depends on the value of the low-order word. This parameter can be one of the following values.
The value of lParam depends on the value of the low-order word of wParam. For more information, see the description of wParam.
If an application processes this message, it should return zero.
This message is also sent to all ancestor windows of the child window, including the top-level window.
All child windows, except those that have the WS_EX_NOPARENTNOTIFY extended window style, send this message to their parent windows. By default, child windows in a dialog box have the WS_EX_NOPARENTNOTIFY style, unless the CreateWindowEx function is called to create the child window without this style.
Minimum supported client
|Windows 2000 Professional|
Minimum supported server
|Windows 2000 Server|
Build date: 9/11/2011