In the following procedure, you will add three new menu items to Enroll’s Record menu: Add, Refresh and Delete. The command IDs you assign to the new menu items are application-specific IDs, not predefined by the framework as are ID_RECORD_FIRST and the other commands on the Record menu.
Tip You may find it helpful to “pin down” the Menu Item Properties dialog box during the following procedure.
To add menu items for the commands
&Add
ID_RECORD_ADD
Add a new section
&Refresh \tEsc
ID_RECORD_REFRESH
Cancel changes on form, or cancel Add
The “\t Esc” coding specifies that the ESC key can be used as an accelerator. If you do not complete the next procedure, Add an Accelerator for the Refresh Command, don’t include this code.
&Delete
ID_RECORD_DELETE
Delete section
You will need the editor open to establish a context when you use ClassWizard to create command handler functions for the menu commands you have just added.
The following figure shows the completed menu in the menu editor.
The Record Menu with New Commands