Lou, a programmer, consultant, and technical writer, is the author of Zen of Windows 95 Programming (Coriolis Group, 1996) and can be contacted at 71055.1240@ compuserve.
Mark Andrews' Migrating to Windows 95 and Charles Petzold and Paul Yao's Programming Windows 95 provide a fascinating snapshot of the current state of Windows development. One book leans fearlessly into the wind, eager to embrace Microsoft's approach and the onslaught of change that Windows coders know only too well. The other takes a more thoughtful approach and seems always to be aware of the need to draw the old guard among Windows developers along, even as it addresses new Windows features.
Mark Andrews' Migrating to Windows 95 has 11 chapters: "Introducing Windows 95," "Underneath Windows 95," "Windows 95 Architecture," "The Win32 API," "Windows 95 and the MFC Library," "Windows 95 and Visual C++," "OLE," "Programs and Processes," "Multithreading and Multitasking," "Windows 95 DLLs," and "Windows 95 Networking." From this list alone you might wonder why this book wasn't titled, "Everything you ever wanted to know about Windows 95, but didn't know to ask." Indeed, Andrews attempts to cover an amazing amount of ground in "only" 600 pages; a more detailed breakout of the book's outline would make this point even clearer. This attempt to encompass so much of the Windows 95 development world is the book's greatest strength and also its greatest weakness. Andrews' book is a perfect fit for the technically astute manager (not an oxymoron) who suddenly must lead a new project and needs to come up to speed quickly on Windows 95 development. In fact, this book might even be unique among current offerings in this regard; Andrews weaves together information at several logical levels to present an overview of the hardware and system architecture, as well as development tools (albeit, just those from Microsoft) and techniques, and provides a remarkably complete view of the Windows 95 terrain from 10,000 feet.
Yet for all the ground Andrews covers, I was disturbed by how often he presents statements that are defensibly correct but open to misinterpretation. For example, on page 65 he says that Windows 95 supports 16-bit Windows programs, which gives you a choice of writing 16- or 32-bit programs. But he says that to create one program that runs under both Windows 3.x and Windows 95, you must write a 16-bit program. What about Win32s? I'm certainly no fan of Win32s; I think it's one of the ugliest hacks ever foisted upon programmers. But to fail to mention it in this context is odd, indeed.
Similarly, Andrews is uncomfortably eager to embrace Windows 95/Visual C++ 4.0/MFC 4.0/OLE as The One True Way. He acknowledges on page 242 that you might choose to develop using a compiler other than VC++, but adds that you should still learn to use VC++ 4.0 first. Given the learning curve associated with modern compiler packages and the horrifically short development schedules many of us face, this is odd advice. This is just one example, but it is characteristic of Andrews' reliance on Microsoft tools and techniques. In all fairness, he is true to his convictions and spends a considerable number of pages detailing development techniques using VC++ 4.0. The problem is that, aside from being narrowly focused on one set of tools, his treatment is not detailed enough to be a generally useful resource for programmers in the trenches. This shouldn't be a surprise; there are books on the market larger than Andrews' that cover nothing but using VC++, so he could hardly match their depth and breadth in only part of his book.
I was also bothered by Andrews' chapter 1 inclusion of extensive quotes from Microsoft marketing people about their goals and design decisions for Windows 95. This material is interesting, but I question its appropriateness in a book subtitled "Programmer's Guide to What's New," especially when presented in a noncritical fashion. Repositioned as an overview for technical managers and perhaps retitled "Migrating to Windows 95: What Every Technical Manager Needs to Know," I think this book makes far more sense.
And now we have, at long last, the update to the Windows programming book (the one everyone recommends to newcomers and is universally known by the author's name, "Petzold"). Not surprisingly, the publication of Programming Windows 95 begs several questions.
Is it just a rehash of the "old Petzold?" Largely, yes. To be sure, it's been updated to include new Windows 95-specific features, but if you know your way around the "old Petzold," the "new Petzold" will instantly fall to hand like your favorite mouse. (To be clear, I don't mean to minimize Paul Yao's contribution; referring to this book in this way is merely my prediction of how it will generally be known.) The chapters include "README.TXT," "Hello, Windows 95," "Painting with Text," "Essential Graphics," "The Keyboard," "The Mouse," "The Timer," "Child Window Controls," "Icons, Cursors, Bitmaps, and Strings," "Menus and Accelerators," "Dialog Boxes," "The Modern User Interface," "Memory Management and File I/O," "Multitasking and Multithreading," "Using the Printer," "The Clipboard," "Dynamic Data Exchange (DDE)," "The Multiple Document Interface," "Dynamic Link Libraries," and "What's This Thing Called OLE?"
Is it still bare-bones C? Yes. In chapter 1, Petzold says:
What I'm going to teach you in this book is what I think of as "classical" Windows programming. I use the plain old C programming language (not C++), and I use the raw application programming interface (API) directly rather than any "wrappers" that hide the API under easier interfaces.
Some readers will wail at this and claim that it makes the book an antique in this age of visual development and ubiquitous, immense, and immensely complicated frameworks. That the book includes numerous resource scripts as .RC files, and that the authors provide a .BAT file for building programs using command-line tools, will make some programmers dismiss the book. I strongly disagree-if anything, I think its approach makes it even more valuable. Bookstores are packed with books about frameworks and various Windows specialties, such as OLE, Windows multimedia, network programming, or compiler-specific development, and there are precious few that even attempt to teach you how Windows itself works. This relentless focus on the basics made the old Petzold a quite valuable (and some would say unique) resource because it laid the foundation for a good understanding of the overall Windows' architecture; the new Petzold will easily take its place, in part because it's been updated so seamlessly. For example, chapter 12, "The Modern User Interface," presents the best and most-detailed treatment I've seen to date on the new custom controls introduced in Windows 95.
Is this a resource for experienced Windows programmers moving to Windows 95? Much of what's here is basic Windows architecture, with little that is Windows 95 specific (including only the merest introduction to OLE), and is therefore (apparently) of little value to battle-weary Windows coders. But again, Programming Windows 95's almost endless detail about the minutiae of Windows, as well as its thoughtful, laid-back presentation, make it a resource that I know I'll keep on my "primary references" shelf, no matter how many Windows programs I write. It's hard to convey to someone who's never seen the old Petzold how much solid information is in this book, even at 1100 pages.
If you refer to your old Petzold more than two or three times a month and you're writing Windows 95 apps, you should buy this book. If someone you know is just starting out with Windows programming, particularly Windows 95, tell that person to buy this book and read it cover to cover.
But above all, be aware of this book's approach, you'll get far more from it if you accept it on its own terms.