Admin Production ni-theme
Current Publication

UnchainCtrlCallback

LabWindows/CVI

UnchainCtrlCallback

int UnchainCtrlCallback (int panel, int ctrl, const char typeName[]);

Purpose

This function unchains the callback function that was linked to the control by the ChainCtrlCallback function.

Note  The behavior of this function is undefined if it attempts to unlink a callback function while inside of a DIFFERENT chained callback function for the same control.

Parameters

Input
Name Type Description
panel int The specifier for a particular panel that is currently in memory.

This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function.
ctrl int Pass the ID of the control from which to unchain the callback function.

The ID is the defined constant (located in the UIR header file) which was assigned to the control in the User Interface Editor, or the ID returned by the NewCtrl or DuplicateCtrl function.
typeName const char[] Pass in the string that was passed to ChainCtrlCallback.

If the control has not been previously linked by ChainCtrlCallback with specified type name, then nothing is done.

Return Value

Name Type Description
status int Returns 1 if the callback was unchained, 0 if the type name was not found, or a negative error code if the function failed.

The possible negative error codes are:

–1 to –999 A User Interface Library error code. (Constants are available in userint.h.)

A description of any of these error codes can be obtained using the GetGeneralErrorString function in the toolbox.fp instrument driver.

Additional Information

Library: Programmer's Toolbox

Include file: toolbox\toolbox.h

LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later