![]() |

| Function |
Declared in: NiNumEditEvents.h |
Declaration
void OnKeyDown(
short FAR* KeyCode,
short Shift);
Description
Generated when you press a key while the control has the input focus.
Parameters
short FAR* KeyCode
short Shift
Specifies the virtual-key code of the given key.
Contains the state of the SHIFT, CTRL, and ALT keys, which can be any combination of the CNiNumEdit::ShiftKeys enumeration values. The list below includes valid enumeration values.
- CNiNumEdit::ShiftKey - the user pressed the SHIFT key.
- CNiNumEdit::CtrlKey - the user pressed the CTRL key.
- CNiNumEdit::AltKey - the user pressed the ALT key.
See Also
Example
void OnKeyDown(short FAR* KeyCode, short Shift) {
// Check for the Alt-Shift-D key.
if ((*KeyCode == 68) && (Shift == CNiNumEdit::ShiftKey | CNiNumEdit::AltKey)) {
// Your event code here.
}
}

