X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2432b92dd7a837db13d3938a56c1959decd03203..1f11220943f14b4bb5190db0dfd0054304f5015c:/src/msw/dib.cpp diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index ed29152759..bd573f2791 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -41,15 +41,18 @@ #include #include #include -#ifndef __MWERKS__ + +#if !defined(__MWERKS__) && !defined(__SALFORDC__) #include #endif #include "wx/msw/dib.h" +#ifndef __TWIN32__ #ifdef __GNUWIN32__ #include "wx/msw/gnuwin32/extra.h" #endif +#endif #ifndef SEEK_CUR /* flags for _lseek */ @@ -258,7 +261,7 @@ HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal) dwLen = bi.biSize + PaletteSize(&bi); - hdc = GetDC(NULL); + hdc = GetDC((HWND) NULL); hpal = SelectPalette(hdc, hpal, FALSE); RealizePalette(hdc); @@ -326,7 +329,7 @@ HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal) GlobalUnlock(hdib); hdib = NULL; SelectPalette(hdc, hpal, FALSE); - ReleaseDC(NULL, hdc); + ReleaseDC((HWND) NULL, hdc); return NULL; }