Skip to content

Commit a05855c

Browse files
committed
docs: 更新文档明确窗口属性中存储的坐标不受 DPI 虚拟化影响
1 parent 5754d8b commit a05855c

2 files changed

+4
-2
lines changed

docs/Interact with Magpie programally.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ destRect.bottom = (LONG)(INT_PTR)GetProp(hwndScaling, L"Magpie.DestBottom");
8282

8383
### Notes
8484

85-
These properties are only guaranteed to exist after the scaling window has completed its initialization. Therefore, it is advisable to check whether the scaling window is visible before retrieving these properties, especially when the window handle is obtained using the class name.
85+
1. These properties are only guaranteed to exist after the scaling window has completed its initialization. Therefore, it is advisable to check whether the scaling window is visible before retrieving these properties, especially when the window handle is obtained using the class name.
86+
2. The coordinates stored in these properties are not DPI-virtualized. To use them correctly, you need to set your application's DPI awareness level to Per-Monitor V2. For more details, please refer to [High DPI Desktop Application Development on Windows](https://learn.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows).
8687

8788
## How to Keep Magpie Scaling When Your Window Is in the Foreground
8889

docs/以编程方式与 Magpie 交互.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ destRect.bottom = (LONG)(INT_PTR)GetProp(hwndScaling, L"Magpie.DestBottom");
8282

8383
### 注意事项
8484

85-
这些属性只在缩放窗口初始化完成后才保证存在,因此建议检索属性前检查缩放窗口是否可见,尤其是当窗口句柄是使用类名获取到的。
85+
1. 这些属性只在缩放窗口初始化完成后才保证存在,因此建议检索属性前检查缩放窗口是否可见,尤其是当窗口句柄是使用类名获取到的。
86+
2. 这些属性中存储的坐标不受 DPI 虚拟化影响,你需要将程序的 DPI 感知级别设置为 Per-Monitor V2 才能正确使用它们。有关详细信息,请参阅 [High DPI Desktop Application Development on Windows](https://learn.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows)
8687

8788
## 如何使 Magpie 在你的窗口位于前台时保持缩放
8889

0 commit comments

Comments
 (0)