- Str255 theName ;
- short theId ;
- OSType theType ;
- strcpy( (char*) theName , name ) ;
- c2pstr( (char*) theName ) ;
-
- Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
- if ( resHandle != 0L )
+ short theId = -1 ;
+ if ( name == "wxICON_INFORMATION" )
+ {
+ theId = kNoteIcon ;
+ }
+ else if ( name == "wxICON_QUESTION" )
+ {
+ theId = kCautionIcon ;
+ }
+ else if ( name == "wxICON_WARNING" )
+ {
+ theId = kCautionIcon ;
+ }
+ else if ( name == "wxICON_ERROR" )
+ {
+ theId = kStopIcon ;
+ }
+ else
+ {
+ Str255 theName ;
+ OSType theType ;
+
+ #if TARGET_CARBON
+ c2pstrcpy( (StringPtr) theName , name ) ;
+ #else
+ strcpy( (char *) theName , name ) ;
+ c2pstr( (char *) theName ) ;
+ #endif
+
+ Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
+ if ( resHandle != 0L )
+ {
+ GetResInfo( resHandle , &theId , &theType , theName ) ;
+ ReleaseResource( resHandle ) ;
+ }
+ }
+ if ( theId != -1 )