MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / GetDpiForWindow

Method GetDpiForWindow

Explorer++/Helper/DpiCompatibility.cpp:44–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44UINT DpiCompatibility::GetDpiForWindow(HWND hwnd)
45{
46 if (m_GetDpiForWindow)
47 {
48 return m_GetDpiForWindow(hwnd);
49 }
50
51 auto hdc = wil::GetDC(hwnd);
52
53 if (hdc)
54 {
55 return GetDeviceCaps(hdc.get(), LOGPIXELSX);
56 }
57
58 return USER_DEFAULT_SCREEN_DPI;
59}

Callers 15

OnInitDialogMethod · 0.80
OnSizeMethod · 0.80
CreateTabToolbarMethod · 0.80
OnHolderWindowPaintMethod · 0.80
InitializeTabsMethod · 0.80
SetMainMenuImagesMethod · 0.80
InitializeMethod · 0.80
AddDefaultTabIconsMethod · 0.80
ShowMethod · 0.80
GeneralSettingsProcMethod · 0.80
InitializeMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected