# Function Reference

# _WinAPI_ClientToScreen

Converts the client coordinates of a specified point to screen coordinates

#include <WinAPIConv.au3>
_WinAPI_ClientToScreen ( $hWnd, ByRef $tPoint )

## Parameters

$hWnd | Identifies the window that will be used for the conversion
$tPoint | $tagPOINT structure that contains the client coordinates to be converted

## Return Value

Success: | a $tagPOINT.
Failure: | sets the @error flag to non-zero.

## Remarks

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.

## Related

$tagPOINT, _WinAPI_ScreenToClient

## See Also

Search ClientToScreen in MSDN Library.

## Example

    #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