X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2afb9e169048b77a41c63b4f4eea3b10daee641a..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/os2/msgdlg.cpp diff --git a/src/os2/msgdlg.cpp b/src/os2/msgdlg.cpp index 4504fd97c7..97e9b8f99c 100644 --- a/src/os2/msgdlg.cpp +++ b/src/os2/msgdlg.cpp @@ -73,14 +73,25 @@ int wxMessageDialog::ShowModal() else ulStyle = MB_OK; } - if (lStyle & wxICON_EXCLAMATION) - ulStyle |= MB_ICONEXCLAMATION; - else if (lStyle & wxICON_HAND) - ulStyle |= MB_ICONHAND; - else if (lStyle & wxICON_INFORMATION) - ulStyle |= MB_ICONEXCLAMATION; - else if (lStyle & wxICON_QUESTION) - ulStyle |= MB_ICONQUESTION; + + switch ( GetEffectiveIcon() ) + { + case wxICON_ERROR: + ulStyle |= MB_ERROR; + break; + + case wxICON_WARNING: + ulStyle |= MB_WARNING; + break; + + case wxICON_QUESTION: + ulStyle |= MB_QUERY; + break; + + case wxICON_INFORMATION: + ulStyle |= MB_INFORMATION; + break; + } if (hWnd != HWND_DESKTOP) ulStyle |= MB_APPLMODAL;