CAccel

What is CAccel?

CAccel is a format used to store accelerator key data within the CMenuBar.

This format is based on ACCEL from the WinAPI, only listed here due to the padding being unclear in the documentation.

Structure

Size Type Name Description
1 UInt8 fVirt The accelerator behavior, Definitions
1   Padding  
2 UInt16 or Virtual-Key Code key The accelerator key, this member can be either a virtual-key code or a character code
2 UInt16 cmd The accelerator identifier
2   Padding  

Flag Definitions

fVirt

Value Name Description
0x01 fVirtKey The key member specifies a virtual-key code. If this flag is not specified, key is assumed to specify a character code
0x02 fNoInvert No top-level menu item is highlighted when the accelerator is used. If this flag is not specified, a top-level menu item will be highlighted, if possible, when the accelerator is used. This attribute is obsolete and retained only for backward compatibility with resource files designed for 16-bit Windows
0x04 fShift The SHIFT key must be held down when the accelerator key is pressed
0x08 fControl The CTRL key must be held down when the accelerator key is pressed
0x10 fAlt The ALT key must be held down when the accelerator key is pressed