]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gdiimage.cpp
Corrected some wxAccessible mistakes
[wxWidgets.git] / src / msw / gdiimage.cpp
index 6fa126cdd17f94a0b4d9cc5ffaae4e3172c781e0..1e7606bcbece9ba0b1cac7626429025c383743f4 100644 (file)
@@ -355,22 +355,13 @@ bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap,
 bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap,
                                 const wxString& name,
                                 int WXUNUSED(type),
 bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap,
                                 const wxString& name,
                                 int WXUNUSED(type),
-                                const wxPalette *pal)
+                                const wxPalette * WXUNUSED(pal))
 {
 {
-#if wxUSE_IMAGE_LOADING_IN_MSW
-
-#if wxUSE_PALETTE
-    wxPalette *actualPalette = (wxPalette *)pal;
-    if ( !actualPalette )
-        actualPalette = bitmap->GetPalette();
-#else
-    wxPalette *actualPalette = NULL;
-#endif // wxUSE_PALETTE
-
-    return wxSaveBitmap(WXSTRINGCAST name, bitmap, actualPalette) != 0;
-#else
-    return false;
-#endif
+    wxCHECK_MSG( bitmap, false, _T("NULL bitmap in SaveFile") );
+
+    wxDIB dib(*bitmap);
+
+    return dib.Save(name);
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------