GetWinPos Function

Requires: gfawinx.lg32

Purpose

Retrieves the current coordinates for a window relative to its parent.

Syntax

GetWinPos hWnd, rc

hWnd: Window handle
rc: RECT*

* The RECT type object is exported by the gfawinx.lg32 library.

Description

GetWinPos retrieves the position rectangle relative to hWnd parents client coordinates.

Example

$Library "gfawinx"

OpenW 1

PushButton "Command", 1, 30, 10, 140, 22

Dim rc As RECT

GetWinPos(DlgItem(Win_1.hWnd, 1), rc)

Print rc.Left   // 30

Print rc.Top    // 10

Print rc.Right  // 170

Print rc.Bottom // 32

Remarks

GetWinPos is an exported DLL function from gfawin23.ocx.

See Also

GetWinRect.

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