use wxImage to load icons in non-native formats

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-06-04 15:51:39 +00:00
parent db67d86dd1
commit 3e0630be8a

View File

@@ -144,8 +144,14 @@ bool wxIcon::LoadFile(const wxString& filename,
if ( !handler )
{
// say something?
return false;
// load via wxBitmap which, in turn, uses wxImage allowing us to
// support more formats
wxBitmap bmp;
if ( !bmp.LoadFile(filename, type) )
return false;
CopyFromBitmap(bmp);
return true;
}
return handler->Load(this, filename, type, desiredWidth, desiredHeight);