+ 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
+ {/*
+ Str255 theName ;
+ OSType theType ;
+ wxMacStringToPascal( name , theName ) ;
+
+ Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
+ if ( resHandle != 0L )
+ {
+ GetResInfo( resHandle , &theId , &theType , theName ) ;
+ ReleaseResource( resHandle ) ;
+ }
+ */
+ }
+ 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 ;