]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dib.cpp
Fixed bug that was giving the wrong size of wxCustomDataObjects to the receiver.
[wxWidgets.git] / src / msw / dib.cpp
index 47c855e7665bd3cbb016f3afe9f296aa12ab1e98..f2e396eb85a643a87f9f7d788a685239f34841ca 100644 (file)
 
 #include "wx/msw/dib.h"
 
-#ifndef __TWIN32__
-#ifndef wxUSE_NORLANDER_HEADERS
-#ifdef __GNUWIN32__
-#include "wx/msw/gnuwin32/extra.h"
-#endif
-#endif
+#ifdef __GNUWIN32_OLD__
+    #include "wx/msw/gnuwin32/extra.h"
 #endif
 
 #ifndef SEEK_CUR
@@ -113,7 +109,7 @@ static BOOL WriteDIB(LPTSTR szFile, HANDLE hdib)
         if (!hdib)
                 return FALSE;
 
-        fh = OpenFile(wxFNCONV(szFile), &of, OF_CREATE | OF_READWRITE);
+        fh = OpenFile(wxConvertWX2MB(szFile), &of, OF_CREATE | OF_READWRITE);
         if (fh == -1)
                 return FALSE;
 
@@ -433,7 +429,7 @@ BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette)
 
     /* Open the file and get a handle to it's BITMAPINFO */
 
-    fh = OpenFile (wxFNCONV(lpFileName), &of, OF_READ);
+    fh = OpenFile (wxConvertWX2MB(lpFileName), &of, OF_READ);
     if (fh == -1) {
         wxLogError(_("Can't open file '%s'"), lpFileName);
         return (0);
@@ -623,6 +619,9 @@ static BOOL PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB,
             result = TRUE;
         }
     }
+
+       GlobalUnlock (hDIB);  // glt
+
     return(result);
 }