NewActiveXCtrl
int NewActiveXCtrl (int panelHandle, char controlLabel[], int controlTop, int controlLeft, const GUID *classID, const IID *interfaceID, char license[], HRESULT *activeXError);
Purpose
Creates a new ActiveX control and returns a control ID used to specify the control in subsequent function calls.
This function also creates and caches a CAObjHandle for the ActiveX control object. Use GetObjHandleFromActiveXCtrl to get the CAObjHandle.
(Linux) This function is not supported.
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. |
controlLabel | char [] | The label of the new control. Pass "" or 0 for no label. |
controlTop | int | The vertical coordinate at which the upper left corner of the control
(not including labels) is placed. 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 | The horizontal coordinate at which the upper left corner of the
control (not including labels) is placed. 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. |
classID | const GUID * | The Class ID of the ActiveX control object. |
interfaceID | const IID * | The interface ID specifying the type of the interface pointer that is
associated with the CAObjHandle of the ActiveX control. Pass 0 to specify the default dispatch interface of the ActiveX control. |
license | char [] | Run-time license string for the ActiveX control. Pass 0 if the ActiveX control does not support licensing. |
Output | ||
Name | Type | Description |
activeXError | HRESULT | The HRESULT if this function causes an ActiveX error. In the event of an ActiveX error, this function returns a value of UIActiveXError. |
Return Value
Name | Type | Description |
controlID | int | Returns the ID used to specify this 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 6.0 and later