# 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 | integer | 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 | integer | 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 | integer | 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 | integer | 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 | integer | 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.