开发者

how to close main window(Dialog) in MFC

开发者 https://www.devze.com 2023-02-05 17:34 出处:网络
In MFC how to close 开发者_如何学Cmain window(Dialog) when child window wm_close event is called I think you can post WM_CLOSE message to the main window in the child window\'s handler of WM_CLOSE. Li

In MFC how to close 开发者_如何学Cmain window(Dialog) when child window wm_close event is called


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);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消