X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fd328a34dce31f4995585a4046e95361ba1c8e2..2cb4351487d67bf316c333edd667d7074c1d866b:/src/msw/icon.cpp diff --git a/src/msw/icon.cpp b/src/msw/icon.cpp index c0070fc713..9064101a53 100644 --- a/src/msw/icon.cpp +++ b/src/msw/icon.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "icon.h" #endif @@ -85,6 +85,19 @@ wxIcon::wxIcon(const wxString& iconfile, LoadFile(iconfile, flags, desiredWidth, desiredHeight); } +wxIcon::wxIcon(const wxIconLocation& loc) +{ + // wxICOFileHandler accepts names in the format "filename;index" + wxString fullname = loc.GetFileName(); + if ( loc.GetIndex() ) + { + fullname << _T(';') << loc.GetIndex(); + } + //else: 0 is default + + LoadFile(fullname, wxBITMAP_TYPE_ICO); +} + wxIcon::~wxIcon() { }