Good tutorials on Win32 API?

A tutorial that explains every little detail, introducing things slowly and in a well thought manner.
If anybody has read "Learning C++ through game programming" by Michael Dawson you'll know that this book introduces things slowly and descriptive, and also backs up the ideas with clear examples and alternative ways of describing things with common terms for everybody to understand (i.e. explaining a function as a box that contains code or a class being an object with properties such as height, width, colour, etc)

The problem is I've looked everywhere for tutorials that teach in this way and I cant find any, I find tutorials that through you strait in and expect you to just keep going until you either understand or just give up and copy and paste code repeatedly, editing things with trial and error till you get it right.
When I learn something I have to understand how and why everything works the way it does, it's a good way to make sure you definitely understand things but it's difficult to just put up and remember things until they're explained later.

Does anybody know of any tutorials as good I want them to be?
Last edited on
I use Programming Windows 5th Edition by Charles Petzold for my reference.
Hmm, shows that book as being published in 1998. Not sure that'd be a good reference for current windows beginning programming.
Yes, it does. Windows API has not been changed since then, only new functions has been added.

And also don't forget MSDN. This is the place where every windows API is documented and also you can find sample codes. Every windows developer, no matter how advanced are, use this website (or an offline copy).
Last edited on
Dear God!!
Yeah that must be a fricking good tutorial cos Amazon shows it as more than £800 pound for the book...
Thank goodness that pdf's where invented (and a thing called google)

A quick look at the contents and a scan of a random page early on and this DOES look like what i'm wanting, thanks lmsmi1

Would you recommend learning C first (I've learned C++ to the extent of what my book covers, plus little bits extra here and there like fstream and such)
OR is what is covered in the Windows tutorial enough to go on through the knowledge of C++ I have?
Last edited on
Learning any C++ at all won't help with Petzold's book, because, at least in the 5th edition, there is no C++ code. None at all. It is all C code.

Its a pet theory of mine, but I think most folks nowadays start out in C++ and digest everything they can about classes and C++ specific things. Then they hit C in Petzold's book and are lost. Instead of classes they see function pointer calls and callback functions using function pointers, and I don't believe they know what they are or what to make of them.

I have quite a few introductory C++ books, and calling functions through addresses is either missing or given little emphasis. In C, this is how things were done. Its how the fundamentals of the Windows Api was implemented, and its going to be greek to a lot of C++ coders until they get onto it. I think a lot don't, and because of this turn to class frameworks instead of the Windows Api.
Last edited on
By the way, the value of the Petzold book, 5th edition, tends to vary widely from day to day at In truth, the 4th edition that came out with Windows 95 was a good book too; in some ways better than the 5th edition, in that it had some decent COM material in it that they left out of the 5th edition. Where the 5th edition is better is that it uses UNICODE, and has a very good chapter on that at the very beginning of the book. However, if you picked up the 4th edition, there are lots of unicode type tutorials and information on the internet.

The 4th edition covers the fundamentals of working with the Windows Api exactly the same as the 5th edition. Also, you don't need a book with the CD because Charles keeps the code available at his website. I believe
Last edited on
Well today I've been reading though quite a bit of the first and second chapter and I do understand a fair bit of it but I can clearly see that learning a good handful of C will do me a lot of good.

Thanks for the advice guys (now... good C books should be much easier to find)

P.S. Is it possible for posts to be locked if anybody else has similar questions?
If so then here's a gift for the mod that can do it :D

Last edited on
Just use MSDN. It has everything you could ever need. Has a tutorial for setting up a skeleton window, and documentation on every thing. From there you can make anything you want.
MSDN is good as a reference, but not as a tutorial. You first need to know what a message is, how your window loop is called, etc.

This tutorial is amazing:

It taught me tons. I don't use it anymore (I like Qt better now), but I'm glad I started with the basics.
I've tried the winprog tutorials and unfortunately It's the complete opposite of what I like in a tutorial. Winprog starts off by showing you an example program that creates a fully functional window (but with no purpose as yet) the explains what all the definitions are short for and expects you to wait till later on to explain some of them but also some things it just seems to not tell you about and hope they're self explanatory which most of the time they aren't.

Anyways this is answered (sorry I forgot to flag as answered) as I find the tutorial mentioned by @lmsmi1 and @freddy1 is a great explination of how every little thing works (which I have said is exactly what I want).

Cheers for all the help anyway to anyone else that's recommend tutorials!
MSDN has a tutorial on the basics. Anything after that you should be able to pick up with independent research and references.

How I learned Win32 was I started with the MSDN tutorial, and each line it had I went and read the documentation for and got a good understanding of how the basic window worked and how messages worked. From there, I just kept taking it further and eventually I was comfortable in it. Then I stopped using it because it's old and there's much easier ways to work.
Topic archived. No new replies allowed.