From ab95207c781dfc2ba23b22064572ee81310ee2fe Mon Sep 17 00:00:00 2001 From: Gavs64 Date: Sun, 29 Nov 2015 17:22:23 +0300 Subject: [PATCH] Fix message boxes with wxYES_NO|wxCANCEL style in wxMSW Windows CE code removal in 8282c1be0f358f5fa00c6aab21c3298af7d8ce02 (see https://github.com/wxWidgets/wxWidgets/pull/81) broke message boxes showing "Yes", "No" and "Cancel" buttons at once, add accidentally removed code back. Closes https://github.com/wxWidgets/wxWidgets/pull/139 --- src/msw/msgdlg.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index 9519b0acaf..f45dc0abf2 100644 --- a/src/msw/msgdlg.cpp +++ b/src/msw/msgdlg.cpp @@ -460,7 +460,10 @@ int wxMessageDialog::ShowMessageBox() const long wxStyle = GetMessageDialogStyle(); if ( wxStyle & wxYES_NO ) { - msStyle = MB_YESNO; + if ( wxStyle & wxCANCEL ) + msStyle = MB_YESNOCANCEL; + else + msStyle = MB_YESNO; if ( wxStyle & wxNO_DEFAULT ) msStyle |= MB_DEFBUTTON2;