// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "gdiimage.h"
#endif
#include <shellapi.h>
#endif
+#include "wx/file.h"
+
#include "wx/listimpl.cpp"
WX_DEFINE_LIST(wxGDIImageHandlerList);
bitmap->SetHeight(bm.bmHeight);
bitmap->SetDepth(bm.bmBitsPixel);
+ // use 0xc0c0c0 as transparent colour by default
+ bitmap->SetMask(new wxMask(*bitmap, *wxLIGHT_GREY));
+
return true;
}
return dib.IsOk() && bitmap->CopyFromDIB(dib);
#else
- return FALSE;
+ return false;
#endif
}
return dib.Save(name);
#else
- return FALSE;
+ return false;
#endif
}
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;
}