4.9 Accelerator Table Resources

An accelerator table is stored as a single resource. Multiple accelerator tables are also allowed. The format of an accelerator table is very simple. No header for the table is used. Each entry in the table has a single 5-byte entry. The last entry in the table has its flag word's high bit set (fFlags |= 0x8000). Because all entries are fixed length, random access can be done because the number of elements in the table can be computed by dividing the length of the resource by eight. Here is the structure of the table entries:


[Normal resource header (type = 9)]

The following structure is repeated for all accelerator table entries.


struct AccelTableEntry {
     WORD     fFlags;
     WORD     wAscii;
     WORD     wId;
     WORD     padding;
     };