# GetCtrlBoundingRect

int GetCtrlBoundingRect (int panelHandle, int controlID, int *top, int *left, int *height, int *width);

## Purpose

Returns the top, left, width, and height coordinates of the bounding rectangle of a control.

The bounding rectangle encloses the body of the control and all of labels of the control.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
Output
Name | Type | Description
top | integer | The top coordinate of the bounding rectangle of the control. The range of top is –32,768 to 32,767. The origin (0,0) is at the upper left corner of the panel, before the panel is scrolled, directly below the title bar. You can pass NULL for this parameter.
left | integer | The left coordinate of the bounding rectangle of the control. The range of left is –32,768 to 32,767. The origin (0,0) is at the upper left corner of the panel, before the panel is scrolled, directly below the title bar. You can pass NULL for this parameter.
height | integer | The vertical size of the bounding rectangle of the control. The range of height is 1 to 32,767. The origin (0,0) is at the upper left corner of the panel, before the panel is scrolled, directly below the title bar.
width | integer | The horizontal size of the bounding rectangle of the control. The range of width is 1 to 32,767. The origin (0,0) is at the upper left corner of the panel, before the panel is scrolled, directly below the title bar.

## Return Value

Name | Type | Description
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
Code | Error Message String
xx | Success