Add New Menus to the Resource File

You need to add an Edit and a File menu to the MENU statement in the resource file. The MENU statement should now look like this:

EditMenuMenu MENU

BEGIN

POPUP “&File”

BEGIN

MENUITEM “&New”, IDM_NEW

MENUITEM “&Open...”, IDM_OPEN

MENUITEM “&Save”, IDM_SAVE

MENUITEM “Save &As...”, IDM_SAVEAS

MENUITEM “&Print”, IDM_PRINT

MENUITEM SEPARATOR

MENUITEM “E&xit”, IDM_EXIT

MENUITEM SEPARATOR

MENUITEM “&About EditMenu...”, IDM_ABOUT

END

POPUP “&Edit”

BEGIN

MENUITEM “&Undo\tAlt+BkSp”, IDM_UNDO ,GRAYED

MENUITEM SEPARATOR

MENUITEM “Cu&t\tShift+Del”, IDM_CUT

MENUITEM “&Copy\tCtrl+Ins”, IDM_COPY

MENUITEM “&Paste\tShift+Ins”, IDM_PASTE ,GRAYED

MENUITEM “C&lear\tDel”, IDM_CLEAR ,GRAYED

END

END

The File menu has seven commands and two separators; each command has a mnemonic, indicated by the ampersand (&).

The Edit menu has five commands and a separator. Each command has both a mnemonic and an accelerator key, separated from the name with a tab (\t). Whenever a command has a corresponding accelerator, it should be displayed in this way. In the Edit menu, the five accelerator keys are ALT+BACKSPACE, DEL, CTRL+INS, SHIFT+INS, and SHIFT+DEL. The separator between the Undo and Cut commands places a horizontal bar between these commands in the menu. A separator is recommended between menu commands that otherwise have nothing in common. For example, Undo affects only the application, whereas the remaining commands affect the clipboard.