Skip to content

Commit 3178458

Browse files
Fea, 添加WindowFromPhysicalPoint
1 parent 757f093 commit 3178458

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

ThunksList.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,7 @@
800800
| LogicalToPhysicalPointForPerMonitorDPI | 调用 LogicalToPhysicalPoint。
801801
| GetSystemDpiForProcess | 调用GetDpiForSystem、GetProcessDpiAwareness。
802802
| IsValidDpiAwarenessContext | 内部实现。
803+
| WindowFromPhysicalPoint | 调用WindowFromPoint。
803804

804805
## userenv.dll
805806
| 函数 | Fallback

src/Thunks/ext-ms-win-ntuser-window.hpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,27 @@ namespace YY::Thunks
124124
return LogicalToPhysicalPoint(_hWnd, _pPoint);
125125
}
126126
#endif
127+
128+
129+
#if (YY_Thunks_Target < __WindowsNT6_1)
130+
131+
// 最低受支持的客户端 Windows Vista [仅限桌面应用]
132+
// 最低受支持的服务器 Windows Server 2008[仅限桌面应用]
133+
__DEFINE_THUNK(
134+
user32,
135+
8,
136+
HWND,
137+
WINAPI,
138+
WindowFromPhysicalPoint,
139+
_In_ POINT _oPoint
140+
)
141+
{
142+
if (auto const _pfnWindowFromPhysicalPoint = try_get_WindowFromPhysicalPoint())
143+
{
144+
return _pfnWindowFromPhysicalPoint(_oPoint);
145+
}
146+
147+
return WindowFromPoint(_oPoint);
148+
}
149+
#endif
127150
}

0 commit comments

Comments
 (0)