X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7520f3da332d64a676b6f7d27a56004fabf2db36..69659fd770f615210efac4b4fa741b3ad6223616:/src/msw/icon.cpp diff --git a/src/msw/icon.cpp b/src/msw/icon.cpp index 2b02805615..ebf8f49d98 100644 --- a/src/msw/icon.cpp +++ b/src/msw/icon.cpp @@ -25,7 +25,6 @@ #endif #ifndef WX_PRECOMP - #include "wx/defs.h" #include "wx/list.h" #include "wx/utils.h" #include "wx/app.h" @@ -145,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);