From: Vadim Zeitlin Date: Sun, 25 Nov 2001 00:53:53 +0000 (+0000) Subject: and now fixes for compilation with wxUSE_PALETTE=1 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/faa1ae782dfb37e12607e200c5c2b8f04d3f31ca and now fixes for compilation with wxUSE_PALETTE=1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 23c3da77ec..80668e7755 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -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