X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..1c8681b4d8b48d01eaad33127a901cb6614a1148:/src/msw/gdiimage.cpp?ds=sidebyside diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index 26cabaa71c..3df7a17979 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -585,7 +585,10 @@ bool wxICOResourceHandler::LoadIcon(wxIcon *icon, wxSize wxGetHiconSize(HICON hicon) { - wxSize size(32, 32); // default + // default icon size on this hardware + // usually 32x32 but can be other (smaller) on pocket devices + wxSize size(::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON)); + #ifndef __WXWINCE__ if ( hicon && wxGetOsVersion() != wxWIN32S ) { @@ -611,6 +614,8 @@ wxSize wxGetHiconSize(HICON hicon) ::DeleteObject(info.hbmColor); } } +#else + wxUnusedVar(hicon); #endif return size; }