GetWinRect Command

Purpose

Returns the origin as well as the width and height of a window including its border.

Syntax

GetWinRect wh%, x%, y%, w%, h%

Description

The command GetWinRect returns in variables x% and y% the X and Y coordinates of the upper left window corner. w% contains the width and h% the height of the window in pixels. The window number (0 .. 31) is specified in wh%, any other value is considered a window handle.

Example

OpenW 1

Local h%, w%, x%, y%

GetWinRect 1, x%, y%, w%, h%

Print x%, y%, w%, h%

Remarks

GetWinRect corresponds in part to the GFA-BASIC command WINDGET 0,x%,y%,w%,h%. However, WindGet requires the output to be first redirected to a window by using Win(wh%).

See Also

WindGet, GetWinPos.

{Created by Sjouke Hamstra; Last updated: 09/05/2020 by James Gaite}