X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c7bd159affe40845b4b820faa3a4e6fd32b3ce1..dd9f8b6bb6935360a8271dc3e8749fb026b601a8:/src/msw/graphics.cpp?ds=sidebyside diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 06497f479c..2d0e3f4eda 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -35,7 +35,7 @@ #include "wx/module.h" #endif -#include "wx/graphics.h" +#include "wx/private/graphics.h" #include "wx/msw/wrapgdip.h" #include "wx/stack.h" @@ -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()