From 85a2769ae5063d26d01ebe086f2e4f9f6ba63d7b Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sat, 28 Sep 2019 22:45:12 +0200 Subject: [PATCH] Use the already determined hwnd in wxWindowMSW::GetDPI --- src/msw/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index e00ac4b25f..a4e2e0c5f4 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4830,7 +4830,7 @@ wxSize wxWindowMSW::GetDPI() const if ( !dpi.x || !dpi.y ) { - WindowHDC hdc(GetHwnd()); + WindowHDC hdc(hwnd); dpi.x = ::GetDeviceCaps(hdc, LOGPIXELSX); dpi.y = ::GetDeviceCaps(hdc, LOGPIXELSY); }