From 3e0630be8a5757147a0b2cc3bfa44109c5e4c9cb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 4 Jun 2006 15:51:39 +0000 Subject: [PATCH] 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 --- src/msw/icon.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/msw/icon.cpp b/src/msw/icon.cpp index 67f83d31f6..ebf8f49d98 100644 --- a/src/msw/icon.cpp +++ b/src/msw/icon.cpp @@ -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); -- 2.45.2