Funktionreferenz


_WinAPI_GetPosFromRect


Interprets the coordinates of the rectangle as offset and position coordinates

#include <WinAPIGdi.au3>
_WinAPI_GetPosFromRect ( $tRECT )

Parameter

$tRECT $tagRECT structure that contains the logical coordinates of the rectangle.

Rückgabewert

Success: The array containing the following information:
[0] - The x-coordinate of the upper-left corner of the rectangle.
[1] - The y-coordinate of the upper-left corner of the rectangle.
[2] - The width of the rectangle.
[3] - The height of the rectangle.
Failure: Sets the @error flag to non-zero.

Bemerkungen

This function is inverse to the _WinAPI_CreateRectEx().

Verwandte Funktionen

_WinAPI_CreateRectEx

Beispiel

#include <WinAPIGdi.au3>
#include <WinAPIMisc.au3>

_Example()

Func _Example()
    Local $aPos = _WinAPI_GetPosFromRect(_WinAPI_CreateRectEx(10, 10, 100, 100))

    ConsoleWrite('Links:   ' & $aPos[0] & @CRLF)
    ConsoleWrite('Oben:    ' & $aPos[1] & @CRLF)
    ConsoleWrite('Breite:  ' & $aPos[2] & @CRLF)
    ConsoleWrite('Höhe: ' & $aPos[3] & @CRLF)
EndFunc   ;==>_Example