- // create an icon
- enum
- {
- Icon_Information,
- Icon_Question,
- Icon_Warning,
- Icon_Error
- } which;
-
-#ifdef __WXMSW__
- static char *icons[] =
- {
- "wxICON_INFO",
- "wxICON_QUESTION",
- "wxICON_WARNING",
- "wxICON_ERROR",
- };
-#else // XPM icons
- static char **icons[] =
- {
- info,
- question,
- warning,
- error,
- };
-#endif // !XPM/XPM
-
- if ( style & wxICON_EXCLAMATION )
- which = Icon_Warning;
- else if ( style & wxICON_HAND )
- which = Icon_Error;
- else if ( style & wxICON_QUESTION )
- which = Icon_Question;
- else
- which = Icon_Information;
-
- wxStaticBitmap *icon = new wxStaticBitmap(this, -1, wxIcon(icons[which]));
+ wxStaticBitmap *icon = new wxStaticBitmap(this, -1,
+ wxTheApp->GetStdIcon(style & wxICON_MASK));