Use the already determined hwnd in wxWindowMSW::GetDPI

This commit is contained in:
Maarten Bent 2019-09-28 22:45:12 +02:00
parent b39c79cb4a
commit 85a2769ae5

View File

@ -4830,7 +4830,7 @@ wxSize wxWindowMSW::GetDPI() const
if ( !dpi.x || !dpi.y ) if ( !dpi.x || !dpi.y )
{ {
WindowHDC hdc(GetHwnd()); WindowHDC hdc(hwnd);
dpi.x = ::GetDeviceCaps(hdc, LOGPIXELSX); dpi.x = ::GetDeviceCaps(hdc, LOGPIXELSX);
dpi.y = ::GetDeviceCaps(hdc, LOGPIXELSY); dpi.y = ::GetDeviceCaps(hdc, LOGPIXELSY);
} }