X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fcac43d7a62883f296889d395b89dc81ef353d2..bba5e72ad3129a1c5660a7089c50865bc93be1a6:/src/msw/ole/activex.cpp?ds=inline

diff --git a/src/msw/ole/activex.cpp b/src/msw/ole/activex.cpp
index e54ffabb78..e8e7647a48 100644
--- a/src/msw/ole/activex.cpp
+++ b/src/msw/ole/activex.cpp
@@ -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);
     }
 }