REVIEW - Visual C++ MFC Programming by Example

Title:

Visual C++ MFC Programming by Example

Author:

John E. Swanke

ISBN:

0879305444

Publisher:

CRC Press (1999)

Pages:

593pp

Reviewer:

Jon Lacey

Reviewed:

October 2000

Rating:

★★★☆☆

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.