- wxASSERT_MSG( (style & wxYES) || (style & wxOK),
- "one of wxOK and wxYES/wxNO must be used" );
+ // It is common to specify just the icon, without wxOK, in the existing
+ // code, especially one written by Windows programmers as MB_OK is 0
+ // and so they're used to omitting wxOK. Don't complain about it but
+ // just add wxOK implicitly for compatibility.
+ if ( !(style & wxYES) && !(style & wxOK) )
+ style |= wxOK;