How to handle messages of sub window in MFC. I created a menu and when I'm clicking the menu, the program creates a dialog window.
How do I close the menu window when its dialog window is closed?
How to handle messages of sub window in MFC. I created a menu and when I'm clicking the menu, the program creates a dialog window.
How do I close the menu window when its dialog window is closed?
If dialog is modal:
Close the parent window after returning from DoModal;
You don't return from DoModal until the dialog is closed.
If dialog is not modal:
When you initialize the dialog, send a pointer of the parent to the dialog.
Close the parent using the pointer, where you capture the dialog close event.