Converts the client coordinates of a specified point to screen coordinates
#include <WinAPIConv.au3>
_WinAPI_ClientToScreen ( $hWnd, ByRef $tPoint )
$hWnd | Identifies the window that will be used for the conversion |
$tPoint | $tagPOINT structure that contains the client coordinates to be converted |
Success: | a $tagPOINT. |
Failure: | sets the @error flag to non-zero. |
The function replaces the client coordinates in the $tagPOINT structure with the screen coordinates.
The screen coordinates are relative to the upper-left corner of the screen.
$tagPOINT, _WinAPI_ScreenToClient
Search ClientToScreen in MSDN Library.
#include <MsgBoxConstants.au3>
#include <WinAPIConv.au3>
Example()
Func Example()
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($MB_SYSTEMMODAL, "_WinAPI_ClientToScreen Example", "Screen Cordinates of client's x,y position: 100,160 is: " & @CRLF & _
"X: " & DllStructGetData($tPoint, "X") & @CRLF & _
"Y: " & DllStructGetData($tPoint, "Y") & @CRLF)
EndFunc ;==>Example