return NULL;
}
- if ( !ConvertFromBitmap((BITMAPINFO *)(void *)GlobalPtr(hDIB), hbmp) )
+ if ( !ConvertFromBitmap((BITMAPINFO *)(void *)GlobalPtrLock(hDIB), hbmp) )
{
// this really shouldn't happen... it worked the first time, why not
// now?
wxPalette *wxDIB::CreatePalette() const
{
+ // GetDIBColorTable not available in eVC3
+#if defined(_WIN32_WCE) && _WIN32_WCE < 400
+ return NULL;
+#else
wxCHECK_MSG( m_handle, NULL, _T("wxDIB::CreatePalette(): invalid object") );
DIBSECTION ds;
// and the colour table
wxCharBuffer rgb(sizeof(RGBQUAD) * biClrUsed);
RGBQUAD *pRGB = (RGBQUAD*)rgb.data();
- SelectInHDC(hDC, m_handle);
+ SelectInHDC selectHandle(hDC, m_handle);
::GetDIBColorTable(hDC, 0, biClrUsed, pRGB);
for ( DWORD i = 0; i < biClrUsed; i++, pRGB++ )
{
palette->SetHPALETTE((WXHPALETTE)hPalette);
return palette;
+#endif
}
#endif // wxUSE_PALETTE