Modifying the Toolbar and Menu

This hour's lesson starts with the MDIWindowsForms application you worked on in Hour 7, “Working with Windows Forms.” You may also download the source code from the Sams Web site. Before getting into the printing functionality, we'll add a menu option and toolbar button to the application for the print feature.

The Print, Page Setup, and Print Preview menu items and Print toolbar button are standard for applications that have printing features. Listing 10.1 indicates which new method and members need to be added to the MDIWindowFrame class declaration. The additions that need to be added to the code from Hour 7 are shown in bold typeface.

Listing 10.1. The MDIWindowFrame Class Changes to Add the Print Menu Item ...

Get Sams Teach Yourself Visual C++® .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.