1
votes

In MFC how to close main window(Dialog) when child window wm_close event is called

1

1 Answers

1
votes

I think you can post WM_CLOSE message to the main window in the child window's handler of WM_CLOSE. Like

void ChildWindow::OnClose( ){
    ::PostMessage(hWnd_MainWindow, WM_CLOSE, 0, 0);
}