X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3019e4d0a0730c31ba7ab64e0f80ac44e6ecc8a..a7d354c6d75a32033f62b8ecadd837519b35b3ef:/src/msw/msgdlg.cpp diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index d0ddb15ac0..feddca7521 100644 --- a/src/msw/msgdlg.cpp +++ b/src/msw/msgdlg.cpp @@ -267,7 +267,7 @@ void wxMessageDialog::ReplaceStaticWithEdit() rc.right - rc.left, rc.bottom - rc.top, GetHwnd(), NULL, - wxhInstance, + wxGetInstance(), NULL ); @@ -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;