mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 20:19:17 +08:00
f3e25ae3e6
* Use DPIAware::DEFAULT_DPI * Make runner DPI-unaware, since it doesn't need to use a Per Monitor V2 DPI. * Programmatically enable "Per Monitor V2 DPI" for the runner proccess and use a separate DPI-unaware thread for the corresponding API calls * Increase PCH memory limit for settings project * Address review issues * Draw zoneWindows properly scaled
12 lines
373 B
C
12 lines
373 B
C
#pragma once
|
|
#include "windef.h"
|
|
|
|
struct DPIAware {
|
|
static constexpr int DEFAULT_DPI = 96;
|
|
|
|
static HRESULT GetScreenDPIForWindow(HWND hwnd, UINT & dpi_x, UINT & dpi_y);
|
|
static HRESULT GetScreenDPIForPoint(POINT p, UINT& dpi_x, UINT& dpi_y);
|
|
static void Convert(HMONITOR monitor_handle, int &width, int &height);
|
|
static void EnableDPIAwarenessForThisProcess();
|
|
};
|