# Function Reference

# _WinAPI_GetClientRect

Retrieves the coordinates of a window's client area

#include <WinAPISysWin.au3>
_WinAPI_GetClientRect ( $hWnd )

## Parameters

$hWnd | Handle of window

## Return Value

Success: | $tagRECT structure that receives the client coordinates
Failure: | Sets the @error flag to non-zero. call _WinAPI_GetLastError() to get extended error information.

## Related

$tagRECT

## See Also

Search GetClientRect in MSDN Library.

## Example

    #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