Petzold's Book

Top  Previous  Next

First Contact

Some years ago, when I thought about converting to Visual Objects I started reading Charles Petzold's "Programming Windows 95" but back then I never made it beyond Chapter 4 because my daily workload simply cut this migration project short. The necessary conversion of my programs to Windows with Xbase++ made me take it from the shelf again. I even decided to buy its latest edition. Still I haven't completely reshelved the old edition because it contains some chapters (Common Controls, DDE) that have not made it into the latest edition anymore. New topics like MDI and the Internet have taken their place. Still the book has grown from 1100 pages to almost 1500.

Good things can be improved

This latest edition ("Programming Windows, Fifth Edition") was my closest pal during the year 2003. I have read almost every page and I have worked my way through almost every sample program in it. The sample programs are written in plain vanilla C without any sudden MFC classes or C++ objects jumping at you as you will find in other books. These sample programs are very often enhanced and improved during the course of a chapter and every single step is explained. While being taken through these steps you learn just the necessary details you need to know about Windows to get to the next version of the program. So the knowledge is passed to you in small doses (that's the way good things are usually delivered) and you are able to follow along all the time.

 

"Complex" topics are treated en-block and after having understood them you are ready for the next sample programs which show how to handle them.

 

The sequence in which the chapters are provided is absolutely perfect. You start on page 1 and work your way through the book page by page, sample by sample and chapter by chapter. And after each chapter you say: Man, I got it! After Chapter 13 you can start to become picky and skip some chapters or change the sequence you work through them.

The Samples

The samples are written in pure C and it might be a good idea to read a good C book beforehand to understand some of the "cryptic operators" you will see in Petzold's code. But they will soon become familiar to you. I have rewritten many of Petzold's samples in Xbase++ and I asked him for a permission to publish the code. He just asked me to put a note in each of my programs telling everyone where the samples originated and gave his OK.

The Catch

Please don't think Petzold's book will be a "Teaching myself how to program Windows in 24 hours" experience. The matter is too complex and the book is too thick. But there's no way around it if you don't want to spend some serious money on seminars to gain profound knowledge in Windows programming. Here's the difference between the Xbase Part and the Win32 approach to the Windows GUI: You'll be up walking fast with Xbase Parts, but investing some extra time and using the "real stuff" will take you a lot further in every respect.

The Accessories

The book comes with a companion CD that contains all samples and the book itself. That way you can always carry the book with you without adding too much weight to your cabin luggage.

Just get it, here are the details:

Charles Petzold: "Programming Windows, Fifth Edition" - The Definitive Guide to the Win32API, Published by Microsoft Press, ISBN 1-57231-995-X