Chapter 4: Working with Menus and Toolbars


OVERVIEW

In this chapter, you learn how to add menus and toolbars to your Visual C++ applications. Menus and toolbars are an excellent way to expand on the functionality of your application and pack a great number of features into an easily accessible interface. They also increase your users' productivity by making it easier for them to gain access to the features that your application provides.

This chapter covers several aspects of creating menus. First, you learn how to fill out a menu with options. Then you learn how to attach program code to the options that your menu provides. This chapter also addresses how to build submenus that branch from the main menus you create. In addition, you learn how to accelerate your users' workflow by adding productivity-enhancing shortcuts and access keys.

As you work through this chapter, you learn how to enable and disable menu items and how to make them appear and disappear. The coverage also includes how to create context menus for specific controls and how to provide easy access to your application's most commonly used commands using toolbars. Finally, you gain an opportunity to put these techniques into practice via the completion of this chapter's game project, the Lottery Assistant game.

In this chapter, you learn the following:

  • How to add a menu system to your application

  • How to add shortcuts and access keys to menu items

  • How to control when users can access menu items

  • How to create context menus for individual controls

  • How to add toolbars to your applications




Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
ISBN: 735615381
EAN: N/A
Year: 2005
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net