From: Stefan Csomor Date: Fri, 30 Nov 2007 16:40:30 +0000 (+0000) Subject: adaptions for latest dc changes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/52018692fa1b1ad580180e31645bed97c7edef09?ds=inline adaptions for latest dc changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 06497f479c..94716dde7d 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -1439,13 +1439,15 @@ void wxGDIPlusRenderer::Unload() wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxWindowDC& dc) { EnsureIsLoaded(); - return new wxGDIPlusContext(this,(HDC) dc.GetHDC()); + wxMSWDCImpl *msw = wxDynamicCast( dc.GetImpl() , wxMSWDCImpl ); + return new wxGDIPlusContext(this,(HDC) msw->GetHDC()); } wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxMemoryDC& dc) { EnsureIsLoaded(); - return new wxGDIPlusContext(this,(HDC) dc.GetHDC()); + wxMSWDCImpl *msw = wxDynamicCast( dc.GetImpl() , wxMSWDCImpl ); + return new wxGDIPlusContext(this,(HDC) msw->GetHDC()); } wxGraphicsContext * wxGDIPlusRenderer::CreateMeasuringContext()