Window Messaging
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
I have not worked with messaging between windows. If I have a modeless dialog serving as the main window of an app that opens another modeless dialog, how do I notify the main window when the modeless child window has been closed?
Put the window handle of the parent modeless dialog into a member variable of the child modeless dialog's class. When the child modeless dialog is closing, capture the events with handlers, such as WM_CLOSE, WM_DESTROY, etc. In those handler,s post a registered window message to the parent window that informs the parent the child is closing. That should work VERY well.