#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?
// 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++ )
{
#endif // wxUSE_IMAGE
#endif // wxUSE_WXDIB
-