获取窗口DPI感知比例 - GetWindowDpiAwarenessScale
函数简介
获取绑定窗口DPI感知比例。
接口名称
GetWindowDpiAwarenessScale
DLL调用
double GetWindowDpiAwarenessScale(long ola, long hwnd);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| hwnd | 长整数型 | 窗口句柄。 |
示例
double scale = GetWindowDpiAwarenessScale(instance, hwnd);
printf("DPI缩放比例: %.2f\n", scale);
返回值
双精度浮点数:窗口的DPI感知缩放比例,例如 1.5。
