Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Chapter 2: Introduction to MFC Visual C++ and MFC Fundamentals


For example, on the main menu, click Project and position the mouse on Add To
Project...

9 To dismiss the menu, click Project
10 Notice that, on the main menu (and any menu), there is one letter underlined on each
word. Examples are F in File, E in Edit, V in View, etc. The underlined letter is
called an access key. It allows you to access the same menu item using the keyboard.
In order to use an access key, the menu should have focus first. The menu is given
focus by pressing either the Alt or the F10 keys.
11 To see an example, press Alt
12 Notice that one of the items on the menu, namely File, has its borders raised. This
means that the menu has focus.
13 Press t and notice that the Tools menu is expanded.
14 When the menu has focus and you want to dismiss it, you can press Esc.
For example, press Esc.
15 Notice that the Tools menu has collapsed but the menu still has focus.
16 Press f then press o. Notice that the Open dialog box displays.
17 To dismiss the Open dialog box, press Esc
18 On some menu items, there is a key or a combination of keys we call a shortcut. This
key or this combination allows you to perform the same action on that menu using
the keyboard.
If the shortcut is made of one key only, you can just press it. If the shortcut is made
of two keys, press and hold the first one, while you are holding the first, press the
second key once and release the first key. Some shortcuts are a combination of three
keys.
To apply an example, press and hold Ctrl, then press o, and release Ctrl.
19 Notice that the Open dialog box opens. To dismiss it, press Esc

From now on, in this book,^
Press Means
T Press the T key
Alt, G Press and release Alt. Then press G
Ctrl + H Press and hold Ctrl. While you are still holding Ctrl, press H once.
Then release Ctrl
Ctrl + Shift + E Press and hold Ctrl. Then press and hold Shift. Then press E once.
Release Ctrl and Shift

Free download pdf