X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8f3f983596d288daa840ffb7510ffa1cc67be0f..c3f64df223f87ef094ee81577a0334905855d14d:/src/msw/gdiimage.cpp diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index 6f904e43d7..1b5000fa5e 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -208,7 +208,7 @@ bool wxGDIImage::FreeResource(bool WXUNUSED(force)) return TRUE; } -WXHANDLE wxGDIImage::GetResourceHandle() +WXHANDLE wxGDIImage::GetResourceHandle() const { return GetHandle(); } @@ -424,6 +424,27 @@ bool wxICOFileHandler::LoadIcon(wxIcon *icon, nameReal = name.BeforeLast(wxT(';')); } +#if 0 + // If we don't know what size icon we're looking for, + // try to find out what's there. + // Unfortunately this doesn't work, because ExtractIconEx + // will scale the icon to the 'desired' size, even if that + // size of icon isn't explicitly stored. So we would have + // to parse the icon file outselves. + if ( desiredWidth == -1 && + desiredHeight == -1) + { + // Try loading a large icon first + if ( ::ExtractIconEx(nameReal, iconIndex, &hicon, NULL, 1) == 1) + { + } + // Then try loading a small icon + else if ( ::ExtractIconEx(nameReal, iconIndex, NULL, &hicon, 1) == 1) + { + } + } + else +#endif // were we asked for a large icon? if ( desiredWidth == ::GetSystemMetrics(SM_CXICON) && desiredHeight == ::GetSystemMetrics(SM_CYICON) )