+IMPLEMENT_DYNAMIC_CLASS(wxICONResourceHandler, wxBitmapHandler)
+
+bool wxICONResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
+ int desiredWidth, int desiredHeight)
+{
+ Str255 theName ;
+ short theId ;
+ OSType theType ;
+ strcpy( (char*) theName , name ) ;
+ c2pstr( (char*) theName ) ;
+
+ Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
+ if ( resHandle != 0L )
+ {
+ GetResInfo( resHandle , &theId , &theType , theName ) ;
+ ReleaseResource( resHandle ) ;
+
+ CIconHandle theIcon = (CIconHandle ) GetCIcon( theId ) ;
+ if ( theIcon )
+ {
+ M_ICONHANDLERDATA->m_hIcon = theIcon ;
+ M_ICONHANDLERDATA->m_width = 32 ;
+ M_ICONHANDLERDATA->m_height = 32 ;
+
+ M_ICONHANDLERDATA->m_depth = 8 ;
+ M_ICONHANDLERDATA->m_ok = true ;
+ M_ICONHANDLERDATA->m_numColors = 256 ;
+ return TRUE ;
+ }
+ }
+ return FALSE ;
+}
\ No newline at end of file