X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e29e19e7e9f74a2106f4cc0186f7b4f208521bd..08bce50191228ae4a423b488beedcc8ef1ebb30c:/src/msw/dib.cpp diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index f56dae0b1f..9b1c1a6160 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -566,7 +566,7 @@ HGLOBAL wxDIB::ConvertFromBitmap(HBITMAP hbmp) 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? @@ -634,7 +634,7 @@ wxPalette *wxDIB::CreatePalette() const // 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++ ) {