From d9b22d8fff794d8cadef74a2710be9e83c1adb5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 6 Sep 2013 17:09:23 +0000 Subject: [PATCH] wxMSW: return correct value from wxMessageDialog::GetReturnCode(). wxMessageDialog's native code didn't call SetReturnCode() as it should. As a result, it didn't work with ShowWindowModal(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/msgdlg.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index 02da8a94d8..e44ca16d1a 100644 --- a/src/msw/msgdlg.cpp +++ b/src/msw/msgdlg.cpp @@ -586,7 +586,9 @@ int wxMessageDialog::ShowMessageBox() // do show the dialog int msAns = MessageBox(hWnd, message.t_str(), m_caption.t_str(), msStyle); - return MSWTranslateReturnCode(msAns); + int ret = MSWTranslateReturnCode(msAns); + SetReturnCode(ret); + return ret; } int wxMessageDialog::ShowModal() @@ -621,7 +623,9 @@ int wxMessageDialog::ShowModal() msAns = IDOK; } - return MSWTranslateReturnCode( msAns ); + int ret = MSWTranslateReturnCode(msAns); + SetReturnCode(ret); + return ret; } #endif // wxHAS_MSW_TASKDIALOG -- 2.45.2