Are there any good books to learn how to do Windows apps?

HI All,
I want to learn how to do Windows apps. Does anyone know where on the internet or a good book to buy to learn how to do this? I have been searching the internet and Amazon for a decent book and have become aggravated with this search.
Years ago Microsoft included in Visual Studio Visual C++. They have changed that. Now there is WinUI, .Net, ASP.Net. There are also things like Blazor, Maui and a bunch of other things that I don't know very much about.
I have 2 books on C++ but I am not interested in doing console apps. These books have over 800 pages of code. Windows is about GUI's.
I have watched some videos but they are done by Indians and they have heavy accents and talk fast making it difficult for this old man to follow.
This is a Windows Programming forum so I hope that someone here can help.
Thanks
Mark
Last edited on
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 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

Two more WinAPI tutorials.
https://riptutorial.com/winapi
http://www.flounder.com/mvp_tips.htm

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. Hard to follow and get an overview of what's available IMO.

There's a lot of 3rd party 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
Do you mean a Windows 'app' (ie as in UWP - Universal Windows Program) or a C++ program that uses a 3rd party library for its gui? There is a big difference!

What George describes above is for Microsoft WIN32 API (basically using c-style functions) and Microsoft MFC (using C++ classes).

If you want a Windows UWP app, then there is C++/Winrt.
https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/intro-to-using-cpp-with-winrt

But before you get into buying books/resources etc for C++ gui programming, you need to decide upon which 3rd party library/framework etc you are going to use. The books are usually specific to a particular library.

For a sample of those available, see Graphical User Interface in
https://en.cppreference.com/w/cpp/links/libs

PS. Stroustrup's book 'Programming: Principles and Practice Using C++' uses the FLTK gui library.

PPS. There's also C++/cli which uses .net. Although if you go down the .net route IMO you'd be better off using c# rather than C++.

WIN32, MFC, cli, winrt (and c# and .net) are all part of Visual Studio (although depending upon your installation options may need to be installed from within VS Installer). So they cannot be used with another compiler.

However, there is Embarcadero C++ Builder which has its VCL (Visual Component Library). There is the free Community Edition:
https://www.embarcadero.com/products/cbuilder/starter

This may be more what you're looking for.

Other 3rd party libraries (eg FLTK) if used will need to be downloaded/installed etc separately.
Last edited on
Look, I want to do modern C++ gui apps. I am not interested in 32 bit apps. Those apps a dying.
I have found Win App SDK with Win UI3. There is some .NET stuff. I just want to do 64 bit Windows 11 apps. I have ideas that I want to bring to life.
I have Visual Studio Community installed. This is the ide that I am interested in learning with.
Last edited on
Win32 is the native API that every other tech mentioned so far relies on as its bottom layer. Its just a name. Programs using it aren't limited to 32 bit systems.
Last edited on
I am not interested in 32 bit apps. Those apps a dying.

Win32 is still very much alive, under changed names. The WinAPI.

The technology is still available and useful, all the current and modern tech uses it as a foundation to build upon. If you want to create native GUI Win apps you will be using some variation of Win32 tech. No getting around that.

Look, I want to do modern C++ gui apps.

Well, since you are so sure about what's available why ask for assistance?

I can create modern WinAPI apps using the WinAPI. Formerly known as Win32. The resulting apps can execute on x64 Windows natively. Win10 or Win11.

Win32 is just a name, think 'rose.'
I am not interested in 32 bit apps


So compile as 64-bit and not 32-bit.

I just want to do 64 bit Windows 11 apps


Yes - but what do you mean by an 'app'. MS app means a UWP program that has to be installed as an 'app' as opposed to a '.exe program' that can just be executed. If you mean a Windows 11 UWP app then with C++ you're restricted to C++/winrt as far as I know.
Hello. I like to read books in order to learn something. The Internet is not for me the most interesting way to learn - or maybe by watching videos. I prefer paper books. Reading your request it seems to me that you want to develop an api using GDI+ (or another graphical interface like imGui or QT). The last one could interest you. Not easy - maybe too sophisticated. When you will experienced with QT I guess that you can create some useful applications. May I suggest you to take a look at the C# which allows you to quickly create apps using a good graphical interface? I assume that you are under Windows. So we have many alternatives. Choose one - try others. Find your way ++
Last edited on
Great that you have ideas you want to develop. Yet you dismiss out of hand suggestions to assist you from people who have experience.

A Windows GUI app can be created by one of several different ways, using different available technologies. Technologies that now are no longer shackled to just Windows-based devices.

There are apps that are targeted to be what is known as Desktop apps, or apps that are universal apps that can execute on different Windows-based platforms.

Windows app development has a very diverse ecosystem. Visual Studio is a decent integrated development environment with available packages for the different technologies.

What you can learn about Windows development is available online, though not together in one neat package like a book. A book is usually out-dated from the moment its published and gets more so the older the book. Online resources can be less out-dated. Online MS resources are hit and miss in that area.

Writing apps for Windows - Windows apps | Microsoft Learn
https://learn.microsoft.com/en-us/windows/apps/get-started/

If your app will only run on Windows, we recommend using the Windows App SDK and WinUI 3.

Hmmmmm, Windows App SDK. Follow that link and we get:
https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/

The Windows App SDK doesn't replace the Windows SDK or existing desktop Windows app types such as .NET (including Windows Forms and WPF) and desktop Win32 with C++. (emphasis added) Instead, the Windows App SDK complements these existing tools and app types with a common set of APIs that developers can rely on across these platforms.

Desktop Win32 app development is not 'dying', no matter what you think or have been told.

Maybe if you gave a brief description of what you'd like to create, so we can better focus on pointing out the relevant technologies best suited for doing that.

I certainly wouldn't think of trying to create an Android, iOS, Mac or Linux app using Desktop Win32 tech.
Windows App SDK and WinUI 3


Yet another way from MS! I've now lost count of the different systems that MS has introduced over the past years - trumpeted its greatness and then abandoned it... I wonder if this is a replacement/update for winrt?

As I mentioned in one of my previous posts, if I was now wanting to produce 'modern' Windows gui programs I'd be carefully looking at C++ Builder from Embarcadero with it's VCL.
Last edited on
I have lost count -- and interest -- in chasing after all the new UI dangling shiny bits MS keeps holding up to distract developers away from thinking about using non-MS development technologies.

I used to use several earlier versions of C++B (4, 5 & 6), as well as Delphi, before Embarcadero was bought out. Before the company IMO ruined the IDE and bloated it up as if it were something designed by MS.

I prefer using Desktop Win32/WinAPI over all these new-fangled UI squirrels, it suits what I want to do. I can spend more time mucking around in the guts of my app instead of worrying about the glitzy look.

IF I ever decided to do a project that required using a different UI tech I'd learn that.

I am a self-taught hobbyist programmer who has little to no need nor desire to "stay current."
C++B and Delphi, oh, my. Those were two excellent Rapid Application Development environments. Designing a UI was similar to drawing a picture in Paintshop.

If the VCL didn't have a native component there were a number of website and companies that offered free and paid components to fit virtually any need.

Torry's Delphi Pages and Delphi Super Page were a great source.
https://torry.net/index.php
http://delphi.icm.edu.pl/

C++B could use Delphi components with ease. The Delphi RAD IDE needed more than a bit of a nudge to use C++B components, if at all.

I've tried the recent versions of C++B and Delphi, and either they refused to install on my Win10 x64 Pro development machine, or crashed when trying to use it.
I like Microsoft products, they work well as far as I am concerned.
I don't hate them but this year has been rough on the M$ side. They released an epic update that wiped out all the shortcuts on your machine, and just last week or so sent another lovely update that restarted windows, then to proceed into the OS it demanded a code from my email which ... I was now locked out of because can't start windows to see the email they sent to log into windows. I get that its a big company and everyone has those kinds of days but the lack of quality control is an ongoing frustration lately. Windows 11, for a user I helped, also associated excel files to firefox automatically (not sure if that was MS or FF screw up) and then when user attempted to open, blew up royally.
their software dev stuff is solid, usually, but even there ... I still have to manually delete pdb files or poke at it sometimes.
@jonnin, are you using Win11? None of what you've described has happened to me and my 3 Win10 machines.

*knock formica*
I use both both 10 and 11.

https://www.theverge.com/2023/1/13/23553370/microsoft-start-menu-taskbar-shortcuts-windows-disappearing-it

the last week thing ...
https://answers.microsoft.com/en-us/windows/forum/all/solution-to-microsoft-forcing-microsoft-account/5542714c-d342-487d-b6cb-652d6ce7b230

just a standard OS update and it rebooted, then demanded a 'microsoft account password' because my wife had paid for subscription office and it knew she had one of their awful accounts. Not ever using it, she forgot the password, and it cheerfully emailed her the answer WHILE LOCKING HER OUT OF WINDOWS AND HER EMAIL. I got it fixed, but that was just a low quality no-name developer type mistake -- and for something NOT required to boot windows in the first place.

the firefox thing, no one here would have clicked OK when it offered to do that.

The PDB thing... soon as it hits 4gb its like 32 bit win again, it demands that you delete it because its 'corrupt'. Deleting it works, but its just... low quality again.
Last edited on
had paid for subscription office

Ah! I refuse to get that 'rainy cloud' Office 365, even free doesn't mean diddly when it requires an online presence, I have an old Office (2010 IIRC) on CD.

As I said, I haven't seen any of these problems, and I keep all 3 Win10 machines up-to-date as soon as the alert nags. 2 x64 Pro and the 3rd is x86 Home.

Thanks for the links, I have some reading to do.

On a good note MS finally fixed some rather low-level annoyances with Visual Studio 2022 V17.5.

1. Retaining selected projects in Batch Build went AWOL several revisions ago.

2. Being able to add existing files to a project that opened up the project's directory for the search. It would open up a default dir location that wasn't even remotely associated with the project/solution.
None of my 3 PCs are able to use Win11, they are veritable dinosaurs with the mobos and CPUs. I like Win10 and see no overwhelming need to go chasing after that shiny squirrel.
I didn't chase it, but bought a new one is all. So far its same as 10 apart from the usual minor but annoying UI changes that didn't need to be made
Topic archived. No new replies allowed.