Add an Accelerator for the Refresh Command

If you don't want to implement an accelerator, you can skip this step and test the application.

Suggested Reading in the Visual C++ User’s Guide

To add an accelerator

  1. In ResourceView, expand the Accelerator folder.

  2. Open the IDR_MAINFRAME accelerator resource.

    Note   The name for this resource doesn’t need to match the menu resource name, so long as the ID you assign to an accelerator matches the ID for the corresponding menu item.

  3. Create a new accelerator with the following ID: ID_RECORD_REFRESH.

  4. From the Key drop-down list, choose, or type in, VK_ESCAPE.

  5. Clear the “Ctrl” modifier box.

  6. Save your work but leave the accelerator editor open.

    You will need this editor or the menu editor open to establish a context when you use ClassWizard to create command handler functions for the menu commands.