Fix message boxes with wxYES_NO|wxCANCEL style in wxMSW

Windows CE code removal in 8282c1be0f (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
This commit is contained in:
Gavs64
2015-11-29 17:22:23 +03:00
committed by Vadim Zeitlin
parent 2db2db7044
commit ab95207c78

View File

@@ -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;