mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
23 lines
597 B
C++
23 lines
597 B
C++
#pragma once
|
|
#include "windef.h"
|
|
|
|
namespace DPIAware
|
|
{
|
|
constexpr inline int DEFAULT_DPI = 96;
|
|
|
|
HRESULT GetScreenDPIForWindow(HWND hwnd, UINT& dpi_x, UINT& dpi_y);
|
|
HRESULT GetScreenDPIForPoint(POINT p, UINT& dpi_x, UINT& dpi_y);
|
|
void Convert(HMONITOR monitor_handle, int& width, int& height);
|
|
void EnableDPIAwarenessForThisProcess();
|
|
|
|
enum AwarnessLevel
|
|
{
|
|
UNAWARE,
|
|
SYSTEM_AWARE,
|
|
PER_MONITOR_AWARE,
|
|
PER_MONITOR_AWARE_V2,
|
|
UNAWARE_GDISCALED
|
|
};
|
|
AwarnessLevel GetAwarenessLevel(DPI_AWARENESS_CONTEXT system_returned_value);
|
|
};
|