]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/bitmap.cpp
added wxSpinCtrlDouble (slightly modified patch 1835864)
[wxWidgets.git] / src / os2 / bitmap.cpp
index 068ccb02949f490423707f51a30af82aef130d21..a565c74f17cdb6e586d80a8c3f917a3e098efb48 100644 (file)
@@ -27,6 +27,7 @@
     #include "wx/image.h"
 #endif
 
+#include "wx/os2/dc.h"
 #include "wx/os2/private.h"
 
 #include "wx/xpmdecod.h"
@@ -94,12 +95,7 @@ void wxBitmapRefData::Free()
 // wxBitmap creation
 // ----------------------------------------------------------------------------
 
-wxObjectRefData* wxBitmap::CreateRefData() const
-{
-    return new wxBitmapRefData;
-}
-
-wxObjectRefData* wxBitmap::CloneRefData(const wxObjectRefData* data) const
+wxGDIRefData* wxBitmap::CloneGDIRefData(const wxGDIRefData* data) const
 {
     return new wxBitmapRefData(*wx_static_cast(const wxBitmapRefData *, data));
 }
@@ -933,9 +929,12 @@ wxImage wxBitmap::ConvertToImage() const
     //
     // May already be selected into a PS
     //
-    if ((pDC = GetSelectedInto()) != NULL)
+    pDC = GetSelectedInto();
+    const wxPMDCImpl *impl; 
+    if (pDC != NULL &&
+        (impl = wxDynamicCast( pDC->GetImpl(), wxPMDCImpl )) != NULL)
     {
-        hPSMem = pDC->GetHPS();
+        hPSMem = impl->GetHPS();
     }
     else
     {