6.13 Summary

This chapter and the two preceding chapters presented a larger, more complete Windows application written with the Microsoft Foundation Class Library.

The principal techniques demonstrated include:

How to integrate the data model with the Windows interface.

How to interact with the user through dialog-box objects.

How to respond to a wide variety of menu commands.

How to respond to keyboard and mouse commands.

To solidify your Windows programming skills using the Microsoft Foundation Class Library, try modifying the Phone Book program to add address information. You'll need to modify class CPerson to hold more data, modify class CEditPerson to process additional dialog data-entry fields, modify the message-handler functions of class CMainWindow wherever they access the internals of a CPerson, and modify the dialog resource template for CEditDialog to specify additional data fields. While you're at it, improve the search capabilities as well, so the user can search for other data items besides last name. By the time you've made these modifications, you may be ready to write your own Windows program with the Microsoft Foundation Class Library.

As you move on to write your own Windows programs with the Microsoft Foundation Classes, use your work in this tutorial as a foundation or template on which to build other applications. Use the cookbook chapters of this manual (chapters 7 through 17) for valuable guidance on specific Microsoft Foundation Class Library programming tasks. And consult the Class Libraries Reference for more information on the many capabilities of the Microsoft Foundation Classes.