Convertit les coordonnées client d'un point spécifié en coordonnées écran
#include <WinAPIConv.au3>
_WinAPI_ClientToScreen ( $hWnd, ByRef $tPoint )
$hWnd | Identifie la fenêtre qui sera utilisée pour la conversion |
$tPoint | Structure $tagPOINT qui contient les coordonnées client à convertir |
Succès: | Retourne la structure $tagPOINT. |
Échec: | Définit @error <> 0. |
La fonction remplace les coordonnées client dans la structure $tagPOINT avec les coordonnées d'écran.
Les coordonnées écran sont relatives au coin supérieur gauche de l'écran.
$tagPOINT, _WinAPI_ScreenToClient
Consultez ClientToScreen dans la librairie MSDN.
#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, "Exemple _WinAPI_ClientToScreen", "Coordonnées écran de la position client (100,160) sont: " & @CRLF & _ "X: " & DllStructGetData($tPoint, "X") & @CRLF & _ "Y: " & DllStructGetData($tPoint, "Y") & @CRLF) EndFunc ;==>Example