Add an Accelerator Table to the Resource Script File

Add the following ACCELERATORS statement to the resource script file:

EditMenu ACCELERATORS

BEGIN

VK_BACK, IDM_UNDO, VIRTKEY, ALT

VK_DELETE, IDM_CUT, VIRTKEY, SHIFT

VK_INSERT, IDM_COPY, VIRTKEY, CONTROL

VK_INSERT, IDM_PASTE, VIRTKEY, SHIFT

VK_DELETE, IDM_CLEAR, VIRTKEY

END

This statement defines five accelerator keys, one for each command. Four accelerators are keystroke combinations using the ALT, SHIFT, or CTRL key.

The ACCELERATORS statement associates each accelerator with a menu ID. The IDM_UNDO, IDM_CUT, IDM_COPY, IDM_PASTE, and IDM_CLEAR constants are the menu IDs of the Edit menu commands. When the user presses an accelerator key, these are the values that are passed to the window function.