转换客户区窗口指定点的坐标到一个屏幕坐标
#Include <WinAPI.au3>
_WinAPI_ClientToScreen($hWnd, ByRef $tPoint)
$hWnd | 被转换为使用的窗口的标识符 |
$tPoint | 包含客户端转换坐标的 $tagPOINT 结构 |
成功: | 返回 $tagPOINT 结构 |
失败: | set @error |
在MSDN中搜索
#include <WinAPI.au3>
_Main()
Func _Main()
Local $hwnd = GUICreate("Example", 200, 200)
Local $tpoint = DllStructCreate("int X;int Y")
DllStructSetData($tpoint, "X", 100)
DllStructSetData($tpoint, "Y", 160)
GUISetState(@SW_SHOW)
Sleep(1000)
_WinAPI_ClientToScreen($hwnd, $tpoint)
MsgBox(0, "_WINAPI_ClientToScreen Example", "Screen Cordinates of client's x,y position: 100,160 is: " & @LF & _
"X: " & DllStructGetData($tpoint, "X") & @LF & _
"Y: " & DllStructGetData($tpoint, "Y") & @LF)
EndFunc ;==>_Main