X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5431e4a68473e31cc6870d67577aa12a2fb39fa4..ea412ac4eb9f19e3c28dfa32aa9099a81ac7c74c:/src/msw/msgdlg.cpp diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index 43ed4e1c6e..feddca7521 100644 --- a/src/msw/msgdlg.cpp +++ b/src/msw/msgdlg.cpp @@ -507,14 +507,25 @@ int wxMessageDialog::ShowModal() } } - if (wxStyle & wxICON_EXCLAMATION) - msStyle |= MB_ICONEXCLAMATION; - else if (wxStyle & wxICON_HAND) - msStyle |= MB_ICONHAND; - else if (wxStyle & wxICON_INFORMATION) - msStyle |= MB_ICONINFORMATION; - else if (wxStyle & wxICON_QUESTION) - msStyle |= MB_ICONQUESTION; + // set the icon style + switch ( GetEffectiveIcon() ) + { + case wxICON_ERROR: + msStyle |= MB_ICONHAND; + break; + + case wxICON_WARNING: + msStyle |= MB_ICONEXCLAMATION; + break; + + case wxICON_QUESTION: + msStyle |= MB_ICONQUESTION; + break; + + case wxICON_INFORMATION: + msStyle |= MB_ICONINFORMATION; + break; + } if ( wxStyle & wxSTAY_ON_TOP ) msStyle |= MB_TOPMOST;