Add wxGetDPIofHDC() helper function and use it in wxMSW code
No real changes, just replace several pairs of calls to GetDeviceCaps() with a single helper function call.
This commit is contained in:
@@ -4878,9 +4878,7 @@ wxSize wxWindowMSW::GetDPI() const
|
||||
|
||||
if ( !dpi.x || !dpi.y )
|
||||
{
|
||||
WindowHDC hdc(hwnd);
|
||||
dpi.x = ::GetDeviceCaps(hdc, LOGPIXELSX);
|
||||
dpi.y = ::GetDeviceCaps(hdc, LOGPIXELSY);
|
||||
dpi = wxGetDPIofHDC(WindowHDC(hwnd));
|
||||
}
|
||||
|
||||
return dpi;
|
||||
|
||||
Reference in New Issue
Block a user