September 4th, 2011, 07:10 AM
MDI Message handling
My problem is, that i dont know how to handle messages for my MDI childs.
Sending a message to e.g. destroy a specific child window is no problem but is there the possibility to be notified, when a child window is closed?
I wrote a window class by myself and pass it during the creation of the child in the LPARAM of the MDICREATESTRUCT.
Practicaly i want to destroy this class when the user closes the window. So how can i handle the WM_CLOSE / WM_MDIDESTROY (??) Messages?
Hope someone can help me out there i puzzled on this problem for a while now,
November 8th, 2011, 12:27 PM
Re: MDI Message handling
On any window, you can handle things in the WM_DESTROY. That includes MDI child windows. Of course, you can use the WM_MDIDESTROY as well.
If you want to close a class, do a "delete this" in the destroy, but that can be complicated. Or you can look at WM_PARENTNOTIFY.
Tags for this Thread
Click Here to Expand Forum to Full Width