Join Books.org — it's free

Platform-Specific Programming, Windows/Windows 95 & 98
Programming Windows 95 with MFC (Microsoft Programming Series) by Jeff Prosise β€” book cover

Programming Windows 95 with MFC (Microsoft Programming Series)

by Jeff Prosise
Write a review
Log in to track your reading progress.

Overview

Delving deep into the structure of the Microsoft Foundation Class Library (MFC), Jeff Prosise reveals how you can create code once and use it again and again. If you write applications for Microsoft Windows, MFC will transform the way you work.

Experience Level: Intermediate/ Advanced

Reviews

There are no reviews yet. Log in to write one.

Editorials

Booknews

A comprehensive introduction and guide to Microsoft Foundations Class programming. Beginning with the basics of Microsoft Windows and MFC, it emphasizes the use of MFC classes and the writing of MFC code. The companion CD-ROM contains source code for all sample programs in the text. Annotation c. Book News, Inc., Portland, OR (booknews.com)

Emily Berk

The Road Not Taken

Most books about Windows programming tread similar paths; the organization and topics in most books about Windows programming in MFC are nearly identical. Landmarks you pass always include: how the author got into Windows, discovered MFC, realized that Visual C++ is the best compiler in the universe -- the perfect combination of encapsulation of the Windows SDK and efficiency. Then, they talk about how wonderful VC's wizards are at generating Windows applications. Then, because the wizards always generate document/view applications, before page 50, they discuss the document/view architecture, which takes up most of the rest of the book.

Jeff Prosise gets a short way down this same old path before taking a radical turn -- he decides to not start by dissecting the archetypal application that Microsoft would have us start with. Instead of encouraging us to let the wizards of Microsoft light our trails, he shows us how to strike out on our own. Once embarked on this independent path, Prosise mentions the document/view architecture, but only to promise to steer clear of it for a while. He mostly keeps his promises.

Prosise makes a pretty good guide, and over some pretty rough terrain too. He seems to be targeting his book at experienced C++ programmers who have never programmed in Windows before, like, perhaps, some of those UNIX types who've been won over by the wonders of NT, or maybe it's the former Borland C++ programmers he's after. In any case, Prosise devotes no space at all to defining or describing in the abstract object-oriented techniques or the fairly arcane C++ terminology and lore he occasionally brings up. But he does go into nicely gorey detail about the intricasies of Windows' message routing and the SDK as well as the other Windows-specific components that MFC programmers need to know about, despite the fact that MFC supposedly encapsulates the SDK so well.

Prosise's descriptions of Windows' functionality and how to take advantage of it are excellent. His expositions on GDI objects -- the scrollbar, brushes vs. pens, and the colors of controls, as well as his page on when to delete objects and when to let Windows do it (page 106) are worth the price of admission.

What Prosise is not is well-organized. Partly, this springs from the difficulty of presenting so much material in "only" 1000 pages. And, in part, it comes from Prosise's decision, which I admire immensely, to attempt to put off discussing MFC's infamous document/view philosophy until his eighth chapter. Unfortunately, he can't quite pull this off perfectly. (It's not entirely his fault; document/view infects many parts of MFC that would be healthier without it.) And, also some of the disorganization comes from Prosise's obvious enthusiasm for his subject. He can't seem to stay focused on simple programming tasks; he's got much more to share.

So, there you are, reading about dialog boxes in Chapter 6 for example. In introducing the code sample, Prosise writes, (overly modestly, you'll discover) "The DlgDemo1 application ... does the bare minimum amount of work necessary to get a dialog box up on the screen." You steel yourself for a boring read. But, lo and behold, early in the code you spot a method called DoGradientFill(). Now, what on earth does this have to do with doing the bare minimum of anything? Nothing at all, actually. It's as if your mom had come over to show you how to prepare meatloaf, and, next thing you know, Julia Child is browning a truffle soufflΓ© with a blowtorch in your kitchen.

If all you actually wanted to do was build a plain vanilla dialog box, well then, you would not be pleased. If you just want answers to specific questions, read a different book and let Microsoft's silly old wizard generate your About boxes for you. Prosise usually gets around to introducing the main course, in this case the dialog box, but his style is to describe complicated appetizers first. After the gradients, he digresses to a useful and interesting discussion of how different display adapters dither colors under Windows and how developers can cope with this. It is way cool.

But to find it, you probably have to read from cover to page 364, because (to most people's minds, anyway) dithering has little to do with dialog boxes. The word "dithering" is entirely absent from the index. "Dithering" is absent from both of the Table of Contents as well. And, to find all the other interesting stuff buried here, you probably have to read this book from cover to cover.

Which isn't painful. It's a good book. If you are a C++ programmer by training, avocation or profession, and you are fairly new to programming in MFC, or you're just looking for medium-deep MFC, Prosise's Programming Windows 95 with MFC is definitely the tutorial for you.

If you're not already very comfortable with C++, make sure you have a good language reference at hand. That way, when Prosise throws in a dig at ANSI C++, which MFC thumbs its nose at in a number of confusing ways, you'll at least be able to parse his sentences. (Hint: Read and mark the page for "vtable" in your C++ reference before you even open Prosise. He gets his digs in early and often.)--Dr. Dobb's Electronic Review of Computer Books

Book Details

Published
May 1, 1996
Publisher
Microsoft Press,U.S.
Pages
999
Format
Paperback
ISBN
9781556159022

More by Jeff Prosise

Similar books