Admin Production ni-theme
Current Publication

SetCommonDialogShortcutKeys

LabWindows/CVI

SetCommonDialogShortcutKeys

int SetCommonDialogShortcutKeys (int panel, int enterControl, int escapeControl, int closeCtrl);

Purpose

This function makes it easier to assign the usual shortcut keys to the OK and Cancel buttons of a dialog.

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.
enterControl int Pass the control ID of the control whose shortcut key should be the Enter key. This is commonly the "OK" button on a dialog.

Pass zero to have the function ignore this parameter.
escapeControl int Pass the control ID of the control whose shortcut key should be the Escape key. This is commonly the "Cancel" button on a dialog.

Pass zero to have the function ignore this parameter.
closeCtrl int Pass the control ID of the control which should be activated when the user tries to close the panel using the close box or the system menu. This is commonly the "Cancel" button on a dialog.

Pass zero to have the function ignore this parameter.

Return Value

Name Type Description
status int Returns 0 if the function succeeded 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