#pragma hdrstop
#endif
+#if wxUSE_WXDIB
+
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
+ #include "wx/intl.h"
+ #include "wx/bitmap.h"
+ #include "wx/image.h"
#endif //WX_PRECOMP
-#if wxUSE_WXDIB
-
-#include "wx/bitmap.h"
-#include "wx/intl.h"
#include "wx/file.h"
#include <stdio.h>
#include <memory.h>
#endif
-#include "wx/image.h"
#include "wx/msw/dib.h"
#ifdef __WXWINCE__
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
#endif // wxUSE_IMAGE
#endif // wxUSE_WXDIB
-