Where to find Win32, COM, MFC, ATL tutorials?

I have to learn windows programming for my job since the code base I currently work with uses MFC and ATL. I've never used them for writing C++ windows apps and have only ever used C# (.NET) so you'll have to excuse me if this question is too broad in scope.

The documentation on the learn.microsoft websites is vast and comprehensive [1],[2]. This [3] article is really helpful in explaining the relationship between MFC and Win32, ATL and COM. But I'm looking for code tutorials, which they seem to lack.

Do you know of any resources to help me build windows apps that'll expose me to Win32,COM,MFC,ATL? What did you do to gain experience?

[1] https://learn.microsoft.com/en-us/cpp/mfc/mfc-desktop-applications?view=msvc-170
[2] https://learn.microsoft.com/en-us/cpp/atl/active-template-library-atl-concepts?view=msvc-170
[3] https://learn.microsoft.com/en-us/cpp/windows/overview-of-windows-programming-in-cpp?view=msvc-170
There really is no "one stop shopping" online when it comes to tutorials and example code for learning Win32 technology anymore. Examples are flung far and wide in tidbits here and there.

theForger's Win32 API Tutorial is still available. It is a bare-bones beginners look at the Win32 API.

http://www.winprog.org/tutorial/

Fair warning: the code was written back in Win9X days, the Win32 API has changed since then. I have a github repo where I updated the code to better reflect modern Win API coding practices.

https://github.com/GeorgePimpleton/theForger-winapi-tutorial

Another WinAPI tutorial.
https://riptutorial.com/winapi

A tutorial for MFC, though I can't say it if it good or not. I've only skimmed the contents.
https://www.tutorialspoint.com/mfc/index.htm

Older versions of the WinAPI SDK were available for download, and included example sample code along with the Win SDK documentation accessible offline. I believe it is still possible to download the archives, though I haven't looked for any for years.

MS has git repositories for Windows API sample code online, though the samples are coded to use the WinRT and C++. The original WinAPI was C based.

MS documentation for the WinAPI is all online now, as you've discovered. Hard to follow and get an overview of what's available IMO.

ATL was too fringe for me to spend time learning, I am a self-taught hobbyist.

COM and ATL are technologies that haven't aged well.

I can recommend books for learning the WinAPI, MFC or COM that goes beyond the basics, though they are old books. And might be hard to find and/or expensive. Books was the way to learn when I first dabbled with learning the WinAPI and C/C++. Back in the 1990's.

I don't own any books for ATL.
Last edited on
This site could be of interest:
http://www.flounder.com/mvp_tips.htm
As with theForger, the Flounder's site is decidedly out of date. Heh™.

Copyright © 1998-2008.

Not that there's anything inherently wrong with that.
Hello. I would like to say something - but maybe it is a stupidity. Sorry for that...
I like MFC and it works well as expected. I have no complaint. However, do you think that today it could be better to use something like Qt in order to create interface and solid applications? It seems to me really efficient, beautiful and clever? Just a question.

https://www.qt.io/
Last edited on
George P wrote:
I can recommend books for learning the WinAPI, MFC or COM that goes beyond the basics, though they are old books


Thanks, George. I'm reading "COM Programming By Example" by John Swanke and "Professional ATL COM Programming" by Richard Grimes at the moment. Couldn't find anything written more recently.
The "Bible" of Windows API programming:

"Programming Windows", Fifth Edition by Charles Petzold.
https://www.amazon.com/Programming-Windows®-Fifth-Developer-Reference/dp/157231995X/

The book was originally written and published for Win9X, so not every code example will compile without some modifications.

The code examples have been updated and put into a gitub repo.

https://github.com/recombinant/petzold-pw5e

There is a 6th edition of "Programming Windows," but it uses C# and is targeted for Win 8.

There a similar book for MFC programming: "Programming Windows with MFC", Second Edition by Jeff Prosise.
https://www.amazon.com/gp/product/1572316950/

As I said, neither book is recent, but they still do a good job of showing the nitty-gritty of bashing together code for low-level Win programming.

There's a lot of code available out on the interwebz for C-based WinAPI and MFC still.

Microsoft as a github repo of a lot of "classic" code examples for Windows Desktop apps.
https://github.com/microsoft/Windows-classic-samples
Topic archived. No new replies allowed.