NewCtrl
- Updated2023-02-21
- 3 minute(s) read
int NewCtrl (int panelHandle, int controlStyle, char controlLabel[], int controlTop, int controlLeft);
Purpose
Creates a new control and returns a control ID that you can use to specify the control in subsequent function calls.
If you call this function to add a timer control to a panel, you must do so in the same thread in which you create or load the panel.
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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
controlStyle | int | Select one of the following control styles.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
controlLabel | char [] | Label of the new control. Pass "" or 0 for no label. Note: This parameter is ignored for splitters, tabs, and decorations. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
controlTop | int | Vertical coordinate at which to place the upper left corner of the control,
not including labels. The coordinate must be an integer value from –32,768 to 32,767. The origin (0,0) is at the upper-left corner of the panel, directly below the title bar, before the panel is scrolled. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
controlLeft | int | Horizontal coordinate at which to place the upper left corner of the control,
not including labels. The coordinate must be an integer value from –32,768 to 32,767. The origin (0,0) is at the upper-left corner of the panel, directly below the title bar, before the panel is scrolled. |
Return Value
Name | Type | Description |
controlID | int | Returns the ID you can use to specify the control in subsequent function calls. Negative values indicate that an error occurred. Zero is not a valid ID. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later