X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1f48575d11df10dba9353588003f71d8b126e90..dd9f8b6bb6935360a8271dc3e8749fb026b601a8:/src/msw/ole/activex.cpp?ds=inline diff --git a/src/msw/ole/activex.cpp b/src/msw/ole/activex.cpp index 2c53f29629..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) @@ -894,7 +896,6 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk) continue; // check if default event sink - bool defInterface = false; bool defEventSink = false; int impTypeFlags = 0; typeInfo->GetImplTypeFlags(i, &impTypeFlags); @@ -912,11 +913,6 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk) wxFAIL_MSG(wxT("Default event sink is in vtable!")); } } - else - { - // WXOLE_TRACEOUT("Default Interface"); - defInterface = true; - } } @@ -1129,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); } }