REVIEW - Visual C++ MFC Programming by Example


Visual C++ MFC Programming by Example


John E. Swanke



CRC Press (1999)




Jon Lacey


October 2000



All in all a nicely laid out book

In the introduction the author purports to provide 'numerous examples of applications and features using Microsoft's Visual C++ and the Microsoft Foundation Classes'. The examples are suggested to be like those found in the best-selling apps of today and will help the reader to write the best-selling apps of tomorrow. The book is split into four sections; The Basics, User Interface Examples, Internal Processing Examples and Packaging Examples. Various appendixes include common Windows message, Dialogue and Plain Window styles and descriptions of how to set-up and use static and dynamic linked libraries. The first section covers the basics, starting with how to create a window with or without the use of the MFC, descriptions of the main three MFC classes (

CObject, CWnd, CCmdTarget
) and how an MFC application communicates with the use of messages. The last part of section one looks at the various aspects of drawing inside a window.

Section two is by far the largest of the sections and has the majority of the code and examples and shows the use of menus, toolbars, dialogue boxes and control windows. The third section shows how to include messaging, files, lists and cutting and pasting into your applications. The last section explains how to package software into DLLs and resource libraries rather than stand alone code.

The ubiquitous companion CD contains a working Visual C++ v5.0 project for each example in the book and a Sample Wizard utility which the author informs us will help us add the examples in the book directly into our applications. All in all a nicely laid out book that includes various examples that are useful in teaching the beginner how to use the power of the Microsoft Foundation Classes.

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.