Book Image

Microsoft Visual C++ Windows Applications by Example

By : Stefan Bjornander, Stefan Björnander
Book Image

Microsoft Visual C++ Windows Applications by Example

By: Stefan Bjornander, Stefan Björnander

Overview of this book

Table of Contents (15 chapters)
Microsoft Visual C++ Windows Applications by Example
Credits
About the Author
About the Reviewer
Preface
Index

The Resource


The Application Wizard creates a basic set of menus, which are used by the Application Framework. We add the menus Add and Format to the resource with the help of the Resource Editor.

It is also possible to use the Resource Editor to add accelerators. The Application Wizard has already added accelerators to some of the menu items it generated. We will add accelerators to the menu item we have added. One advantage is that we can reuse the menu item identifiers above to represent accelerators. This means that the Application Framework will call the same method, no matter if the user has selected the menu item or the accelerator. We can also reuse the same identifiers to represent a button in a toolbar. The Application Wizard creates a default toolbar we can increase.

We can also add a status line and a tool tip with the help of the string table. The string connected to the identifier is divided into two parts by a new line (\n). The first part is the status line and the second...