]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dib.cpp
Cured last focus bug (I hope); some wxMotif mods
[wxWidgets.git] / src / msw / dib.cpp
index 7e5d0959de518e953b2927976d3897f71bda9ab2..bd573f27910963350071f1a67628e7980c7959eb 100644 (file)
 
 #include "wx/msw/dib.h"
 
 
 #include "wx/msw/dib.h"
 
+#ifndef __TWIN32__
 #ifdef __GNUWIN32__
 #include "wx/msw/gnuwin32/extra.h"
 #endif
 #ifdef __GNUWIN32__
 #include "wx/msw/gnuwin32/extra.h"
 #endif
+#endif
 
 #ifndef SEEK_CUR
 /* flags for _lseek */
 
 #ifndef SEEK_CUR
 /* flags for _lseek */
@@ -259,7 +261,7 @@ HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal)
 
        dwLen = bi.biSize + PaletteSize(&bi);
 
 
        dwLen = bi.biSize + PaletteSize(&bi);
 
-       hdc = GetDC(NULL);
+       hdc = GetDC((HWND) NULL);
        hpal = SelectPalette(hdc, hpal, FALSE);
        RealizePalette(hdc);
 
        hpal = SelectPalette(hdc, hpal, FALSE);
        RealizePalette(hdc);
 
@@ -327,7 +329,7 @@ HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal)
                GlobalUnlock(hdib);
                hdib = NULL;
                SelectPalette(hdc, hpal, FALSE);
                GlobalUnlock(hdib);
                hdib = NULL;
                SelectPalette(hdc, hpal, FALSE);
-               ReleaseDC(NULL, hdc);
+               ReleaseDC((HWND) NULL, hdc);
                return NULL;
                }
 
                return NULL;
                }