+ OSType theId = 0 ;
+
+ if ( filename == wxT("wxICON_INFORMATION") )
+ {
+ theId = kAlertNoteIcon ;
+ }
+ else if ( filename == wxT("wxICON_QUESTION") )
+ {
+ theId = kAlertCautionIcon ;
+ }
+ else if ( filename == wxT("wxICON_WARNING") )
+ {
+ theId = kAlertCautionIcon ;
+ }
+ else if ( filename == wxT("wxICON_ERROR") )
+ {
+ theId = kAlertStopIcon ;
+ }
+ else if ( filename == wxT("wxICON_FOLDER") )
+ {
+ theId = kGenericFolderIcon ;
+ }
+ else if ( filename == wxT("wxICON_FOLDER_OPEN") )
+ {
+ theId = kOpenFolderIcon ;
+ }
+ else if ( filename == wxT("wxICON_NORMAL_FILE") )
+ {
+ theId = kGenericDocumentIcon ;
+ }
+ else
+ {
+#if 0
+ Str255 theName ;
+ OSType theType ;
+ wxMacStringToPascal( name , theName ) ;
+
+ Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
+ if ( resHandle != 0L )
+ {
+ GetResInfo( resHandle , &theId , &theType , theName ) ;
+ ReleaseResource( resHandle ) ;
+ }
+#endif
+ }
+
+ if ( theId != 0 )
+ {
+ IconRef iconRef = NULL ;
+ verify_noerr( GetIconRef( kOnSystemDisk, kSystemIconsCreator, theId, &iconRef ) ) ;
+ if ( iconRef )
+ {
+ m_refData = new wxIconRefData( (WXHICON) iconRef ) ;
+
+ return true ;
+ }
+ }
+
+ return false ;