Use an appropriate icon automatically in wxMSW wxMessageDialog.
wxMessageBox() functions uses wxICON_QUESTION or wxICON_INFORMATION automatically if no other icon style (including wxICON_NONE) is specified but wxMessageDialog under MSW didn't do this, unlike under e.g. wxGTK. Fix this by also determining the appropriate icon automatically in wxMessageDialog itself in wxMSW. Ideally we'd do this in all ports wxMessageDialog implementations and remove the code doing it from wxMessageBox() but right now it's still needed for the platforms other than wxMSW and wxGTK. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8bd410eb80
commit
b76b3d2854
@ -507,6 +507,7 @@ int wxMessageDialog::ShowModal()
|
||||
}
|
||||
}
|
||||
|
||||
// set the icon style
|
||||
if (wxStyle & wxICON_EXCLAMATION)
|
||||
msStyle |= MB_ICONEXCLAMATION;
|
||||
else if (wxStyle & wxICON_HAND)
|
||||
@ -515,6 +516,8 @@ int wxMessageDialog::ShowModal()
|
||||
msStyle |= MB_ICONINFORMATION;
|
||||
else if (wxStyle & wxICON_QUESTION)
|
||||
msStyle |= MB_ICONQUESTION;
|
||||
else if (!(wxStyle & wxICON_NONE))
|
||||
msStyle |= wxStyle & wxYES ? MB_ICONQUESTION : MB_ICONINFORMATION;
|
||||
|
||||
if ( wxStyle & wxSTAY_ON_TOP )
|
||||
msStyle |= MB_TOPMOST;
|
||||
|
Loading…
Reference in New Issue
Block a user