DYNACCEL demonstrates creating an accelerator table at run time
rather than in the resource file. It creates a table of accelerator
keys and their associated command IDs. The CustomTranslateAccelerator()
function is used in place of Windows' TranslateAccelerator(). It
traps any WM_KEYDOWN or WM_SYSKEYDOWN messages, checks the table to
see if the key matches an accelerator key, checks to see if Ctrl,
Shift, Alt or no other key is down as appropriate, and generates a
message if all conditions are met.

DYNACCEL can be enhanced to use a dynamically sized or updated
table or to include other desired functionality because
everything is created and maintained within the program.
