I've been working with Windows CE for almost as long as it's been in existence. A Windows programmer for many years, I'm amazed by the number of different, typically quite small, systems to which I can apply my Windows programming experience. These Windows CE systems run the gamut from PC-like mini-laptops to embedded devices buried deep in some large piece of industrial equipment. The use of the Win32 API in Windows CE enables tens of thousands of Windows programmers to write applications for an entirely new class of systems. The subtle differences, however, make writing Windows CE code somewhat different from writing for the desktop versions of Windows. It's those differences that I'll address in this book.
Programming Microsoft Windows CE is written for anyone who will be writing applications for Windows CE. Both the embedded systems programmer using Windows CE for a specific application and the Windows programmer interested in porting an existing Windows application or writing an entirely new one can use the information in this book to make their tasks easier.
The embedded systems programmer, who might not be as familiar with the Win32 API as the Windows programmer, can read the first section of the book to become familiar with Windows programming. While this section isn't the comprehensive tutorial that can be found in books such as Programming Windows, by Charles Petzold, it does provide a base that will carry the reader through the other chapters in the book. It also can help the embedded systems programmer develop fairly complex and quite useful Windows CE programs.
The experienced Windows programmer can use the book to learn about the differences among the Win32 APIs used by Windows CE and Windows XP. Programmers who are familiar with Win32 programming recognize subtle differences between the Windows Me and Windows XP APIs. The differences between Windows CE and its two cousins are even greater. The small footprint of Windows CE means that many of the overlapping APIs in the Win32 model aren't supported. Some sections of the Win32 API aren't supported at all. On the other hand, because of its unique setting, Windows CE extends the Win32 API in a number of areas that are covered in this text.
The method used by Programming Windows CE is to teach by example. I wrote numerous Windows CE example programs specifically for this book. The source for each of these examples is printed in the text. Both the source and the final compiled programs for a number of the processors supported by Windows CE are also provided on CD 1 of the accompanying CDs.
The examples in this book are all written directly to the API, the so-called "Petzold" method of programming. Since the goal of this book is to teach you how to write programs for Windows CE, the examples avoid using a class library such as MFC, which obfuscates the unique nature of writing applications for Windows CE. Some people would say that the availability of MFC on Windows CE eliminates the need for direct knowledge of the Windows CE API. I believe the opposite is true. Knowledge of the Windows CE API enables more efficient use of MFC (about which I'll say more in a minute). I also believe that truly knowing the operating system also dramatically simplifies the debugging of applications.