LabWindows/CVI

NewHyperLinkCtrl

int NewHyperLinkCtrl (int panel, int control, const char *target);

Purpose

Creates a new hyperlink control from a text message control. Like other controls, the hyperlink control is discarded by DiscardCtrl and DiscardPanel. Refer to the instrument help for more information about using this control.

Note  This instrument uses the toolbox ChainCtrlCallback function on the hyperlink control and the ChainPanelCallback function on the panel of the hyperlink control and its parent panels. If you change the callback function or callback data of the control or panels, the resulting behavior is undefined. However, you may call ChainCtrlCallback and ChainPanelCallback. You also may set the callback function and callback data for the text message control before converting it to a hyperlink control.

For the same reasons, do not call DuplicatePanel or DuplicateCtrl on any of these panels or the control after the hyperlink control has been created.

Parameters

Input
Name Type Description
panel int The handle of the panel for the hyperlink control.
control int The ID of a text message control that will be converted into a hyperlink control. This control must exist on the panel identified by the panel parameter.
target const char * The target of the hyperlink control. The hyperlink control opens this item when the user clicks the hyperlink. The target can be any valid URL, file path, and so on.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred. Call the GetGeneralErrorString toolbox function to get a descriptive error message.

Additional Information

Library: HyperLink Control

Include file: custctrl\hyperlinkctrl.h

LabWindows/CVI compatibility: LabWindows/CVI 9.0 and later

Example

Refer to userint\custctrl\hyperlinkctrl\simple.cws for an example of using the NewHyperLinkCtrl function.