# Function Reference

ControlGetPos

Retrieves the position and size of a control relative to it's window.

ControlGetPos ( "title", "text", controlID )

Parameters

title | The title of the window to access.
text | The text of the window to access.
controlID | The control to interact with. See Controls.

Return Value

Success: | Returns an array containing the control's position and size relative to it's window:
| $array[0] = X position
| $array[1] = Y position
| $array[2] = Width
| $array[3] = Height
Failure: | Sets @error to 1.

Remarks

None.

Related

ControlCommand, ControlMove, WinMove

Example

$pos = ControlGetPos("Untitled - Notepad", "", "Edit1")
MsgBox(0, "Window Stats:", "POS: " & $pos[0] & "," & $pos[1] & " SIZE: " & $pos[2] & "," & $pos[3] )