7.10 Accelerator Resource

An accelerator resource contains one or more accelerator entries.

Each entry in an executable file's resource table contains a member that identifies the resource type. The RT_ACCELERATOR constant identifies an accelerator resource.

The accelerator entry is a 5-byte entry with the following form:

struct AccelTableEntry {
        BYTE fFlags;
        WORD wEvent;
        WORD wId;
};

Following are the members in the AccelTableEntry structure:

fFlags

Specifies accelerator characteristics. It can be one or more of the following values:

Value Meaning

0x02 Top-level menu item is not highlighted when accelerator is used.
0x04 Accelerator is activated only if user presses the SHIFT key. This flag applies only to virtual keys.
0x08 Accelerator is activated only if user presses the CONTROL key. This flag applies only to virtual keys.
0x10 Accelerator is activated only if user presses the ALT key. This flag applies only to virtual keys.
0x80 Entry is last entry in accelerator table.

wEvent

Specifies an ASCII character value or a virtual-key code that identifies the accelerator key.

wID

Identifies the accelerator. This is the value passed to the window procedure when the user presses the key.