]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dib.cpp
Consistent naming of e.g. wxUSE_CTRL
[wxWidgets.git] / src / msw / dib.cpp
index ed29152759e35732ec46d39c20e227acef3f64f1..bd573f27910963350071f1a67628e7980c7959eb 100644 (file)
 #include <windows.h>
 #include <stdio.h>
 #include <stdlib.h>
-#ifndef __MWERKS__
+
+#if !defined(__MWERKS__) && !defined(__SALFORDC__)
 #include <memory.h>
 #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;
                }