GetCtrlBoundingRect
- Updated2023-02-21
- 2 minute(s) read
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.
Supported Controls
You can use GetCtrlBoundingRect with all LabWindows/CVI user interface controls.
Parameters
Input | ||
Name | Type | Description |
panelHandle | int | Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel. |
controlID | int | 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 functions such as NewCtrl and DuplicateCtrl. |
Output | ||
Name | Type | Description |
top | int | 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 | int | 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 | int | 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 | int | 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 | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later