From c66cd985dd87c65a4e7647465b0d3c1a2e1d072a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 4 Jun 2022 17:37:45 +0100 Subject: [PATCH] Simplify wxGraphicsContext code by using wxDC::GetHDC() No real changes, just use GetHDC() instead of reproducing what it does. --- src/msw/graphics.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 0d67bcf7a6..360d570c27 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -1862,8 +1862,7 @@ wxGDIPlusContext::wxGDIPlusContext( wxGraphicsRenderer* renderer, HDC hdc, wxDou wxGDIPlusContext::wxGDIPlusContext( wxGraphicsRenderer* renderer, const wxDC& dc ) : wxGraphicsContext(renderer, dc.GetWindow()) { - wxMSWDCImpl *msw = wxDynamicCast( dc.GetImpl() , wxMSWDCImpl ); - HDC hdc = (HDC) msw->GetHDC(); + HDC hdc = (HDC) dc.GetHDC(); wxSize sz = dc.GetSize(); Init(new Graphics(hdc), sz.x, sz.y);