+ {
+ wxImage loadimage(filename, type);
+ if (loadimage.Ok())
+ {
+ if ( desiredWidth == -1 )
+ desiredWidth = loadimage.GetWidth() ;
+ if ( desiredHeight == -1 )
+ desiredHeight = loadimage.GetHeight() ;
+ if ( desiredWidth != loadimage.GetWidth() || desiredHeight != loadimage.GetHeight() )
+ loadimage.Rescale( desiredWidth , desiredHeight ) ;
+ wxBitmap bmp( loadimage );
+ wxIcon *icon = (wxIcon*)(&bmp);
+ *this = *icon;
+ return true;
+ }
+ }
+ return false ;