#include "wx/msw/private.h" // needs to be before #include <commdlg.h>
-#if wxUSE_COMMON_DIALOGS
+#if wxUSE_COMMON_DIALOGS && !defined(__WXMICROWIN__)
#include <commdlg.h>
#endif
wxPalette *pal = bmp.GetPalette();
if ( pal && ::GetDeviceCaps(cdc,BITSPIXEL) <= 8 )
{
- oldPal = ::SelectPalette( hdcMem, GetHpalette(pal), FALSE);
+ oldPal = ::SelectPalette(hdcMem, GetHpaletteOf(pal), FALSE);
::RealizePalette(hdcMem);
}
#endif // wxUSE_PALETTE
wxPalette *pal = bmp.GetPalette();
if ( pal && ::GetDeviceCaps(cdc,BITSPIXEL) <= 8 )
{
- oldPal = ::SelectPalette( hdcMem, GetHpalette(pal), FALSE);
- ::RealizePalette(hdcMem);
+ oldPal = ::SelectPalette(memdc, GetHpaletteOf(pal), FALSE);
+ ::RealizePalette(memdc);
}
#endif // wxUSE_PALETTE