WM_MDIDESTROY
hwndChild = (HWND) wParam; /* handle of child to destroy */
An application sends the WM_MDIDESTROY message to a multiple document interface (MDI) client window to close an MDI child window.
hwndChild
Value of wParam. Identifies the child window to destroy.
An application should return zero if it processes this message.
This message removes the title of the child window from the frame window and deactivates the child window. An application should close all MDI child windows with this message.
If a client window receives any message that changes the activation of child windows while the currently active MDI child window is maximized, Windows restores the currently active child window and maximizes the newly activated child window.