WinPositionChild

Returns child window position.

Syntax:

WinPositionChild( partial-parent-winname, partial-child-winname)

Parameters:

(s) partial-parent-winname specifies the parent of the window.

(s) partial-child-winname specifies the child window.

Returns:

(s) window coordinates, delimited by commas.

 

This function is like WinPosition, but returns coordinates for a child window. The coordinates are specified as virtual coordinates within the client area of the parent window, where the parent window is 1000 x 1000.

This function works only with child application windows.

Note: 1000x1000 virtual screen size is based on the primary monitor in a multi-monitor display configuration

Example:

allwins = WinItemize( )
parentwnd = AskItemlist("Top Level Windows", allwins, @TAB, @SORTED, @SINGLE, @FALSE)
childwins=WinItemChild(parentwnd)
childwnd = AskItemlist("Choose a child window to get coordinates from", childwins, @TAB, @SORTED, @SINGLE, @FALSE)
ret = WinPositionChild(parentwnd,childwnd)
Message(StrCat("Parent: ",parentwnd, " Child: ",childwnd), StrCat("coordinates = ",ret))
Exit
See Also:

WinGetActive, WinItemize, WinPosition, WinPlace, WinPlaceGet, WinState, Partial Window Names, IntControl 46