X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e22c13fe7ed64b4a7cb68ef42b338b6805f9fc64..33754c4d83c59b7523a6da0c4fb21079cb60301c:/src/msw/dc.cpp?ds=inline diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 23c3da77ec..f3d7c453e4 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -49,7 +49,7 @@ #include "wx/msw/private.h" // needs to be before #include -#if wxUSE_COMMON_DIALOGS +#if wxUSE_COMMON_DIALOGS && !defined(__WXMICROWIN__) #include #endif @@ -908,7 +908,7 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask 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 @@ -962,8 +962,8 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask 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