Edit Scribble’s Toolbar
The resources that AppWizard creates for Scribble, which you can view in ResourceView, also include a toolbar resource, shown in the following figure. When you build Scribble, the framework uses the toolbar resource to create a dockable toolbar. In this topic you’ll use the toolbar editor to add a new button and, optionally, delete some unnecessary buttons from Scribble’s toolbar.
Suggested Reading
The Default Scribble Toolbar
Earlier in the lesson in Add Scribble’s Pen Menu, you added the Pen menu. One of its menu items is the Thick Line command. The present task is to add a corresponding Thick Line button to Scribble’s toolbar. Then, in Lesson 6, Binding Visual Objects to Code Using WizardBar, you’ll use WizardBar to connect both the Thick Line menu item and the Thick Line toolbar button to the same handler member function. Thus, both user-interface objects will have the same command ID so they generate the same command message, which calls the same handler function. When the user clicks either the menu item or the toolbar button, the handler function toggles Scribble’s drawing pen between thin and thick lines.