]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/pnghand.cpp
no message
[wxWidgets.git] / src / msw / pnghand.cpp
index c6fad8a66b94ffef75daac557b178af7e2c399d6..bea92c61381bead90e66e34f545bf02d2d572ce3 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+
+#if wxUSE_IOSTREAMH
 #include <fstream.h>
 #include <fstream.h>
+#else
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
+
 #include <windows.h>
 #include <wx/msw/pngread.h>
 #include <wx/msw/dibutils.h>
 #include <windows.h>
 #include <wx/msw/pngread.h>
 #include <wx/msw/dibutils.h>
@@ -271,7 +280,7 @@ bool wxPNGReader::InstantiateBitmap(wxBitmap *bitmap)
         HDC dc2 = GetDC(NULL);
         HBITMAP tmpBitmap = ::CreateCompatibleBitmap(dc2, GetWidth(), GetHeight());
         ReleaseDC(NULL, dc2);
         HDC dc2 = GetDC(NULL);
         HBITMAP tmpBitmap = ::CreateCompatibleBitmap(dc2, GetWidth(), GetHeight());
         ReleaseDC(NULL, dc2);
-        HBITMAP oldBitmap = ::SelectObject(dc, tmpBitmap);
+        HBITMAP oldBitmap = (HBITMAP) ::SelectObject(dc, tmpBitmap);
 
         if ( Palette )
         {
 
         if ( Palette )
         {
@@ -342,7 +351,7 @@ wxMask *wxPNGReader::CreateMask(void)
     HBITMAP hBitmap = ::CreateBitmap(GetWidth(), GetHeight(), 1, 1, NULL);
 
        HDC dc = ::CreateCompatibleDC(NULL);
     HBITMAP hBitmap = ::CreateBitmap(GetWidth(), GetHeight(), 1, 1, NULL);
 
        HDC dc = ::CreateCompatibleDC(NULL);
-    HBITMAP oldBitmap = ::SelectObject(dc, hBitmap);
+    HBITMAP oldBitmap = (HBITMAP) ::SelectObject(dc, hBitmap);
 
     int bgIndex = GetBGIndex();
 
 
     int bgIndex = GetBGIndex();