Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Chapter 3: Windows Resources Visual C++ and MFC Fundamentals



  1. Close the window and return to MSVC

  2. Create another icon identified as IDI_APP_ICO and design it follows:

  3. Save All


3.3 Menu Fundamentals........................................................................................


3.3.1 Overview..................................................................................................


A menu is a list of actions the user can perform on an application. Each item of the list is
primarily a word or a group of words on a line. Different menu items are used for
different reasons. For example, some menu items simply display a word or a group of
words. Some other items display a check mark. This indicates that the item toggles the
availability or disappearance of an object.

When a menu item is only meant to lead to a sub-menu, such a menu item is call a popup
menu. There are two types of popup menus. If the menu displays on top of a window,
which is the type of menu under the title bar, the word on top, which represents a
category of menu, is a popup menu. If a menu item is equipped with an arrow in its right

, which means the menu item has a submenu, such a
menu item is also a popup menu. Popup menus are used only to represent a submenu. No
inherent action is produced by clicking them, except that, when placed on top, such menu
items allow opening the submenu.

To create menus that belong to a group, menu items are separated by a horizontal line
called a separator. Separators are created differently in MSVC 6 and MSVC 7.

There are two primary types of menus in most applications: a main menu and a popup
menu.

3.3.2 The Main Menu.......................................................................................


A menu is considered a main menu, when it carries most or all of the actions the user can
perform on an application. Such a menu is positioned on the top section of the main
Free download pdf