Windows native app development is a mess
248 points - today at 9:57 AM
SourceComments
Speaking as a long-time Win32 programmer, the requirements for your app are doable in a few KB (yes, kilobytes --- my vague estimate is less than 8KB) standalone executable. This is how I arrived at that:
Enumerating the machine’s displays and their bounds
A few API calls. Probably a few hundred bytes.
Placing borderless, titlebar-less, non-activating black windows
Creating non-functional windows is trivial. Another few hundred bytes at most.
Intercepting a global keyboard shortcut
A few dozen bytes to call SetWindowsHookEx.
Optionally running at startup
Write to the appropriate registry key. A few hundred bytes.
Storing some persistent settings
Ditto. Another few hundred bytes. You can use a .ini file too, for around the same size.
Displaying a tray icon with a few menu items
Most of this size of this will be the icon itself - a few kilobytes; the next biggest contributor will be text strings; and the rest is accomplished with a few hundred bytes of API calls.
Add another few hundred bytes of (not much) logic, round up to a kilobyte and add maybe another for general overhead.
But, in 2026, writing a greenfield application in a memory-unsafe language like C++ is a crime.
Don't be swayed by the propaganda. Especially if your application has essentially no untrusted input.
Exception being the few APIs that have been introduced in Win32 that instead of COM, actually depend on WinRT like the new MIDI 2.0 or Windows ML.
Keep using Win32, MFC (yes it is in a better state than WinUI 3.0 with C++), WinForms, WPF, if using Microsoft only tooling.
Otherwise, Qt, VCL, Firemonkey, Avalonia, Uno, ImGUI,....
They were even forced to revamp WPF status at BUILD 2024, given how bad WinUI 3.0 was back then, and it isn't if it got any better, apparently it is in the process of being open sourced, to see if the community can take over the mess a $4 trillion valued company cannot fix.
Really, stay away from WinUI, unless you're a Microsoft employee on the Windows team without any other option.
[0] - Can explain by the nth time the differences, if one feels like it.
Recently had to add a new feature to and old program that was last updated in the XP era and two things to note:
1. The program did not need to be updated to run on Vista, 7, 10 and 11, shit just kept working throughout the years.
2. I loaded the project into Visual Studio 2022, it converted from VC6 and compiled without problems, added the feature, shipped a new .exe to the customer, and it just worked.
What other platform has that backwards and forwards compatibility success story?
Clearly this is not an option for those who are just starting up with Windows GUI work, but with little experience it is really a matter of 2-3 weeks of ground work and then you have full control over all nuances of the UI, yours to extend and mend as you wish.
If there's one thing that Microsoft is really good at, it's ensuring deep backward compatibility. So anything that's based on Win32 API is going to be stable. If it works now, it will work later.
I have some examples from 10+ years of development updates accumulated here - https://bvckup2.com/wip
The lessons I've learnt building and shipping a few a Windows apps at scale are basically:
(1) Learn Win32 and use those ancient APIs if possible, they're extraordinarily stable and you'll probably need to reach for them anyway. They're not that scary.
(2) Don't use any Microsoft-owned UI toolkit, you'll get burnt. Literally anything is better. Ideally choose a toolkit that doesn't prevent layering in Win32 tweaks on top, otherwise you'll end up hitting cases the toolkit developers didn't think of and you can't fix. You're going to need a custom WindowProc eventually. You need to have access to the underlying Win32 window lifecycle and handles.
https://www.grc.com/freepopular.htm
Just scroll down the page and look at the size of the completely self-contained executable programs. THIS is what Win32 is capable of. Something we always had with Win32 that was thrown away with .Net and C#.
And _please_ just spare me your opinions of how Steve Gibson "doesn't know anything about security". That's not what's important here. What's important is how freakin' small his full-on GUI stand-alone executables are.
But after I had the msi and dmg files, my non-techy colleagues couldn't install the apps because they weren't signed. The workaround for Mac was fine (remove the quarantine attribute on the installer) but for Windows my colleague had to disable Smart App Control (SAC), which cannot be re-enabled without re-installing Windows.
I get the point of these protections, but the difficulty of getting past them surprised me. I thought that on Mac you should just go to settings -> security and click 'Allow Anyway'. And that on Windows you'd get a GUI warning that would need admin privileges to get past. But MacOS needed a terminal command, and Windows needed a control panel setting change.
Well yes as a user I prefer native apps for their performance. It's clearly a mess to develop native apps as the article shows. But as a user I don't see that problem. I do see ever worsening apps though. Like the total mess that is new outlook and teams.
I disagree, the GUI layer is far from behind a safety critical component, and C++ is a battle-tested choice for everything from GUI, videos games, to industrial applications. If C++ is safe enough to control airplanes and nuclear reactors when used well, it is certainly safe enough for something as trivial a GUI.
The article also fails to mention frameworks like Qt, arguably the best way to write GUI apps in 2026. Qt is native (C++), has built-in memory safety features (but no GC), and is cross-platform.
The last time I had to do Windows development was about 15 years ago. I used a library called WTL (I think a couple comments here mention it). I couldn’t use any of the newer stuff that Windows 8-10 were pushing because it needed backward compatibility. It seemed way less bloated than MFC, but not as annoying to use as ATL or rawdogging Win32 APIs.
Ironically, I was developing a Win32 app to build a cloud bridge to a Rails app (talking to Quickbooks COM API which was hell on Earth, with XML and XML definitions) on Mac, using VMware on Mac to talk to Quickbooks Windows. I was so annoyed with Win32 development I used the Chrome Embedded Framework library to build the UI for the Win32 app so I wouldn’t have to wrestle WTL for UI and just have browser-based views to drive UI.
I think it was very tempting to drop C/C++ development for .NET code, but I didn’t want to drop off user adoption by requesting users to download a huge .NET runtime if their computer didn’t already have it.
This was when I was building Levion, a Quickbooks Windows to Cloud Rails app…
It's another example of how they have completely abandoned any attempt at providing a good user experience across their products
Also, I think C# is miles better than TypeScript, but that's just my preference.
I first investigated the Windows native options and was pretty bamboozled; I wanted to use the "mainstream" "up to date" option (presumably c# and some framework) but as TFA describes, it wasn't at all clear which that was.
I ended up doing it in python with pyqt then finding out a clean deployment was a pain, so revisited the .Net options and remembered why I'd discarded them in the first place...
It is indeed a complete mess (at least coming in anew) and a very strange situation for the world's main desktop environment to be in.
My first thought was MFC. Basic, fast, well understood.
But then maybe WxWindows so we can cross-compile it (from Linux) and use the same UI on other platforms? It could probably be compiled statically although I've not tested it.
Or Mono, but that needs a runtime?
Edit: Some comments mention Qt which could also work although how large is the runtime? Can it be compiled statically?
.NET has new releases every year, supported for 2 or 3 years. That’s not really compatible with Windows release cycles. Also, if Windows 11 25H2 shipped .NET 8, and now Windows 11 26H2 would ship .NET 10, apps which depend on version 8 might break. Easier to just think of .NET as a runtime like Java or Python.
---
Regarding tray icons, 1Password, Signal, and Discord are all Electron apps, so they are using Chrome’s UI toolkit, and its menu component.
Myself, I’m happy with WPF. Starting with .NET 9, it comes with a really good WinUI-style theme.
Such is the benefit and the curse, I guess, of having the Windows API being locked in the distant past for backwards compatibility.
I've always been surprised that Microsoft didn't do a full operating system refactor and provide a compatibility layer for running old binaries. Perhaps they figure it would be better to just transition everything to software as a service using web tech? But I just don't see how that strategy is gonna work long-term.
Just do exactly what Apple does. Charge me $100 directly from you and let me build an .exe that I can distribute on my website.
I think they spent all their mana for that on pre-.NET Visual Basic and then had nothing left.
I'm glad people still care about stuff like this. It drives me insane that the simplest form-based software that I build and compile ends up being 50-100 MiB; several times video games from the 80s that I grew up with that did much more complex work, graphically and computationally, on a tenth of the space.
Running with html/css/js has benefits it really is open and free development based on international standards and not locked into any single big tech.
It might be nice if the article could add screenshots, a few of the Wikipedia links have a screenshot, but again I’m not sure if you’re limited to that UI or not.
I also like the carousel in the article showing the tray menus, but again not sure what they are each “built-with”.
Meanwhile editions of Gnome come with Gnome Builder and Flatpak has solved the distribution problem. Things are so much better today on Linux than most people who have used Windows will even remember.
I’m was thinking about building native windows UI, wrapping around cross platform library written in swift. I did not know it was that messy and complicated.
I mean, not like this brings Windows development anywhere close to "modern", if anything, it feels like you're moving into the opposite direction, but at least this solves the "The modern APIs don't provide the specific functionality I need" problem that plagues all of Microsoft's "nice", "modern" abstractions…
1. Wow you have great knowledge of windows. Congratulations
2. Boy windows API is a mess.
You dont have to use MVVM or AXML for example Uno allows for C# Markup[3] to be used instead or MVUX instead of MVVM.
I personally hate MVVM and AXML but you are not forced to use them.
For Avalonia I dabbled in creating my own replacement[4] for MVVM and AXML using Flecs.Net.
In Avalonia I created a tray icon for the trash bin. So I can see how big it is and clear/open it with a small menu[5].
Both Avalonia and Uno should at least be looked at when judging which framework to use. They are both quite mature and have many great controls and features built in.
[1] https://avaloniaui.net/ [2] https://platform.uno/ [3] https://platform.uno/docs/articles/external/uno.extensions/d... [4] https://github.com/AyanamiKaine/Ayanami-sTower/blob/main/Ava... [5] https://github.com/AyanamiKaine/Ayanami-sTower/blob/main/App...
Having never written Windows apps, I am surprised to learn how disorganized and chaotic this all is.
And if you set a native theme for TTK in your code (literal two lines), your software will stop looking Motif-Industrial, the widgets will have the classic Win32 themes. It will look native from XP and up.
Hobby projects should not be built on a platform that is constantly changing underneath.
But imgui is a breeze of fresh air for internal stuff
With Delphi creating of Native Windows Desktop Applications is a piece of cake (also does MacOS, iOS, Android and partially Linux). Yes it is by now obscure and expensive tool but I still use it to maintain my existing native GUI desktop applications. It is incredibly easy to use / develop with and single exe no dependencies deployment mode is superior. Compatibility between Windows versions is stellar as well.
There is also an opensource version of Delphi called Lazarus which is way less polished.