X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9542f0a109720cf68646356248828001e46ed415..a29b55cdf6c1f8547c615a5e928813ba78566e9a:/src/msw/gdiimage.cpp?ds=sidebyside diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index 126da04b01..36c3623a9f 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -372,7 +372,8 @@ bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, wxDIB dib(name); - return dib.IsOk() && bitmap->CopyFromDIB(dib); + bool ok = dib.IsOk() && bitmap->CopyFromDIB(dib); + return ok; #else WXHBITMAP hBitmap = (WXHBITMAP)wxLoadBMP(name); if(hBitmap) { @@ -584,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 ) { @@ -610,6 +614,8 @@ wxSize wxGetHiconSize(HICON hicon) ::DeleteObject(info.hbmColor); } } +#else + wxUnusedVar(hicon); #endif return size; } @@ -659,7 +665,7 @@ HBITMAP wxLoadBMP(const wxString& filename) pBmpInfo->bmiHeader.biSizeImage = nBitsSize; //HBITMAP hBitmap=SetBitmap((LPBITMAPINFO)pBmpInfo, pBits); - DWORD dwBitmapInfoSize = sizeof(BITMAPINFO) + nColors*sizeof(RGBQUAD); + //DWORD dwBitmapInfoSize = sizeof(BITMAPINFO) + nColors*sizeof(RGBQUAD); // Create a DC which will be used to get DIB, then create DIBsection HDC hDC = ::GetDC(NULL);