]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/activex.cpp
hook the docview-specific customization of event handling logic at TryValidator(...
[wxWidgets.git] / src / msw / ole / activex.cpp
index e54ffabb78e8d3300de4750dcc89c26989196fa9..e8e7647a4850c8cc6ccfc25a1ff095d4455a9dac 100644 (file)
@@ -30,6 +30,8 @@
     #include "wx/math.h"
 #endif
 
+#include "wx/msw/dc.h"
+
 #include "wx/msw/ole/activex.h"
 // autointerfaces that we only use here
 WX_DECLARE_AUTOOLE(wxAutoIOleInPlaceSite, IOleInPlaceSite)
@@ -1123,8 +1125,9 @@ void wxActiveXContainer::OnPaint(wxPaintEvent& WXUNUSED(event))
         ::InvalidateRect(m_oleObjectHWND, NULL, false);
 #endif
         RECTL *prcBounds = (RECTL *) &posRect;
+        wxMSWDCImpl *msw = wxDynamicCast( dc.GetImpl() , wxMSWDCImpl );
         m_viewObject->Draw(DVASPECT_CONTENT, -1, NULL, NULL, NULL,
-            (HDC)dc.GetHDC(), prcBounds, NULL, NULL, 0);
+            (HDC)msw->GetHDC(), prcBounds, NULL, NULL, 0);
     }
 }