#include "wx/msw/dibutils.h"
+#ifdef __WXWINE__
+ #include <module.h>
+#endif
+
#if defined(__WIN32__)
#if !defined(__MWERKS__) && !defined(__SALFORDC__)
#include <memory.h> // for _fmemcpy()
BOOL bOK = FALSE;
int nOK = 0;
- //*** Reset everything in the system palette to black
+ // *** Reset everything in the system palette to black
for(Counter = 0; Counter < 256; Counter++)
{
Palette.aEntries[Counter].peRed = 0;
Palette.aEntries[Counter].peFlags = PC_NOCOLLAPSE;
}
- //*** Create, select, realize, deselect, and delete the palette
+ // *** Create, select, realize, deselect, and delete the palette
+#ifdef __WXWINE__
+ ScreenDC = GetDC((HWND)NULL);
+#else
ScreenDC = GetDC(NULL);
+#endif
ScreenPalette = CreatePalette((LOGPALETTE *)&Palette);
if (ScreenPalette)
bOK = DeleteObject(ScreenPalette);
}
+#ifdef __WXWINE__
+ nOK = ReleaseDC((HWND)NULL, ScreenDC);
+#else
nOK = ReleaseDC(NULL, ScreenDC);
+#endif
return;
}