X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..81bfc17cc63bde7034da16df0c9cb246a8738337:/src/msw/gdiimage.cpp?ds=sidebyside diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index 65b239a09c..6988f3d0c4 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -28,11 +28,11 @@ #include "wx/string.h" #include "wx/log.h" #include "wx/app.h" + #include "wx/bitmap.h" #endif // WX_PRECOMP #include "wx/msw/private.h" -#include "wx/bitmap.h" #include "wx/msw/gdiimage.h" #if wxUSE_WXDIB @@ -104,7 +104,7 @@ public: // creating and saving icons is not supported virtual bool Create(wxGDIImage *WXUNUSED(image), - void *WXUNUSED(data), + const void* WXUNUSED(data), long WXUNUSED(flags), int WXUNUSED(width), int WXUNUSED(height), @@ -567,12 +567,10 @@ bool wxICOResourceHandler::LoadIcon(wxIcon *icon, wxSize wxGetHiconSize(HICON WXUNUSED_IN_WINCE(hicon)) { - // default icon size on this hardware - // usually 32x32 but can be other (smaller) on pocket devices - wxSize size(::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON)); + wxSize size; #ifndef __WXWINCE__ - if ( hicon && wxGetOsVersion() != wxWIN32S ) + if ( hicon ) { ICONINFO info; if ( !::GetIconInfo(hicon, &info) ) @@ -596,7 +594,14 @@ wxSize wxGetHiconSize(HICON WXUNUSED_IN_WINCE(hicon)) ::DeleteObject(info.hbmColor); } } -#endif + + if ( !size.x ) +#endif // !__WXWINCE__ + { + // use default icon size on this hardware + size.x = ::GetSystemMetrics(SM_CXICON); + size.y = ::GetSystemMetrics(SM_CYICON); + } return size; }