X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..d721baa9e64ff989a995faa3b8cfe93dbb2957ae:/src/common/utilscmn.cpp diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 8abc0215ac..2fd1c86901 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -747,7 +747,14 @@ wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt) int wxMessageBox(const wxString& message, const wxString& caption, long style, wxWindow *parent, int WXUNUSED(x), int WXUNUSED(y) ) { - wxMessageDialog dialog(parent, message, caption, style); + long decorated_style = style; + + if ( ( style & ( wxICON_EXCLAMATION | wxICON_HAND | wxICON_INFORMATION | wxICON_QUESTION ) ) == 0 ) + { + decorated_style |= ( style & wxYES ) ? wxICON_QUESTION : wxICON_INFORMATION ; + } + + wxMessageDialog dialog(parent, message, caption, decorated_style); int ans = dialog.ShowModal(); switch ( ans )