+ // next check if it's not a standard icon
+ if ( !hicon )
+ {
+ static const struct
+ {
+ const wxChar *name;
+ LPTSTR id;
+ } stdIcons[] =
+ {
+ { wxT("wxICON_QUESTION"), IDI_QUESTION },
+ { wxT("wxICON_WARNING"), IDI_EXCLAMATION },
+ { wxT("wxICON_ERROR"), IDI_HAND },
+ { wxT("wxICON_INFO"), IDI_ASTERISK },
+ };
+
+ for ( size_t nIcon = 0; !hicon && nIcon < WXSIZEOF(stdIcons); nIcon++ )
+ {
+ if ( name == stdIcons[nIcon].name )
+ {
+ hicon = (HICON)::LoadImage((HINSTANCE)NULL,
+ stdIcons[nIcon].id,
+ IMAGE_ICON,
+ desiredWidth, desiredHeight,
+ LR_DEFAULTCOLOR);
+ }
+ }
+ }
+