Obtient les coordonnées de la zone cliente d'une fenêtre
#include <WinAPISysWin.au3>
_WinAPI_GetClientRect ( $hWnd )
$hWnd | Handle de la fenêtre |
Succès: | Retourne la structure $tagRECT qui reçoit les coordonnées de la zone cliente |
Échec: | Définit @error <> 0. Appelez _WinAPI_GetLastError() pour obtenir des informations sur l'erreur. |
Consultez GetClientRect dans la librairie MSDN.
#include <MsgBoxConstants.au3> #include <WinAPISysWin.au3> Example() Func Example() Local $hWnd, $tRect $hWnd = GUICreate("test") $tRect = _WinAPI_GetClientRect($hWnd) MsgBox($MB_SYSTEMMODAL, "Rect", _ "Left..: " & DllStructGetData($tRect, "Left") & @CRLF & _ "Right.: " & DllStructGetData($tRect, "Right") & @CRLF & _ "Top...: " & DllStructGetData($tRect, "Top") & @CRLF & _ "Bottom: " & DllStructGetData($tRect, "Bottom")) EndFunc ;==>Example