Free Q2 Map Viewer
Click here to go to the Q2View program

Introduction to the Win32 Tutorials


Even creating a basic Windows application using the Win32 API can be daunting the first time you see the source code, but you will be surprised how easy it actually is once you have worked with the API for a while. In this series of tutorials I will start by showing you how to create a standard single window application and progress through to encapsulating the main window and other controls in C++ classes. This might seem like a strange target to aim for since it has already been done for us with Microsoft Foundation Classes (MFC), but through writing an application using 'straight' Win32 you will gain a better understanding of how the API works, reduce bloat and give you more control over the appearance and behavior of your applications. To give an example of how little control we have using MFC or a visual compiler I would like you to think back to when you last saw a multicolored window, one that didn't use the current theme colors. Most likely you have rarely seen one; the reason for this is that there are no simple functions to set the colors of a window or its controls. This is a blatant attempt by Microsoft to make all applications conform to a standard appearance. By failing to provide an easy way to set the colors of a window and its controls Microsoft can be somewhat assured that few anarchistic looking applications will be produced. To overcome this limitation and many others we will need to know the Win32 API in depth; then we can create a better way to design and manage our windows through the use of owner-drawn controls and object orientated programming, which are covered later in the tutorials.

There are already a lot of tutorials covering Win32 programming on the web so it may appear as if I am going over old ground with yet another series of tutorials, but it always pays to learn from more than one source. You will find that each source of information covers the topic a little differently and fills in gaps that the others may not have covered. All you need for the most part is to know the C programming language, and much later in the tutorials you will also need some basic C++ and STL experience.

All of the example programs used with these tutorials were compiled using the free and easy to use Dev-C++ compiler, covered in the second tutorial, so the good news is that learning and using the Win32 API wont cost you a cent. Of course, if you are financially secure then a small donation would help me to spend more time working on these and other tutorials.

Copyright © 1998 - 2010 Alan Baylis, All Rights Reserved