From 53a6ac21b84c24bbfc2f03500f7edab73f8feff8 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Sat, 29 May 2004 15:45:24 +0000 Subject: [PATCH] applied valid part of patch #940683: "wxMessageBox autocompletion" git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/utilscmn.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 ) -- 2.45.2