X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c7bd159affe40845b4b820faa3a4e6fd32b3ce1..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/msw/graphics.cpp 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()