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) {
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 )
{
::DeleteObject(info.hbmColor);
}
}
+#else
+ wxUnusedVar(hicon);
#endif
return size;
}
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);