Posted by domenicd 9 hours ago
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.
[0] https://blogs.windows.com/windows-insider/2026/03/20/our-com...
Thus better leave WinUI to the Windows team.
When it was announced at PDC, they only talked about WinJS and nothing else, the folks of .NET Rocks have a few shows where they mention they thought .NET was done, and they needed to refocus into something else.
The show where they interview Miguel de Icaza they go into this.
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
On top of this, there are a small handful of system UIs that do support dark mode and make your program look inconsistent with dark mode regardless. Message boxes will switch to dark mode, and so will file dialogs -- which is a problem if you've used the Vista-style customization, as any syslinks will appear in a color of blue that's hard to read against the dark mode background.
Second, win32 is designed with the ability to change all the default colors and you used to be able to do this by right clicking the desktop and selecting "properties". If dark mode doesn't follow this - just another symptom of Microsoft's siloing incompetence. The team that wrote dark mode may not have been aware that this feature existed because parts of the platform are so disconnected from other parts.
Win32 controls ignoring system colors goes much farther back than dark mode being introduced in Windows 10. The theming engine that broke a lot of that functionality was introduced in Windows XP. Beyond that, there were always a few hardcoded colors like disabled gray text going back to Windows 95.
Dark mode ignoring Win32 system colors is not incompetence. It was _intentional_. Dark mode was introduced by the UWP side, which intentionally did not extend it to Win32. To this day, there is not even a Win32 API for desktop apps to query whether dark mode is even enabled. The official recommendation is to compute the luminance of the UWP foreground color setting:
https://learn.microsoft.com/en-us/windows/apps/desktop/moder...
Plus the whole thing is meant to work on ancient Windows versions (like, Vista and WS2008 ancient), so that ultimately defines the minimal common UI denominator.
For years we loaded up libraries and abstractions to minimize boilerplate. These hid the actual underlying mechanisms and often made specific customisations harder to do since you were taken away from the raw functionality.
These days AI is extremely good at writing boilerplate and in my opinion explicitly typed out boilerplate code is much easier to reason about than a library that abstracts things away to a one line annotation or similar.
A good example is that i've recently been leaning back to the raw Android apis for things like recyclerviews etc. It used to be 10+ files to changed to create an efficient scrolling view on Android with various resources and adapters required. So a whole bunch of libraries came out to try to abstract the complexity away. You know what though? I don't care about that anymore. I'm going back to the raw GUI APIs where possible because it's so explicit and clear even if it's 10x more code.
Wine is better at it than Windows itself. Especially for really old programs.
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?
Gtk on the other hand is absolutely terrible and its developers don't help by completely rewriting things every few years and breaking all existing code in the process.
If you want something more custom, subclass NSControl and you’re off to the races.
And if Obj-C isn’t your cup of tea, one can use Swift instead, even in a codebase that had been only Obj-C prior.
Button(“Click Me”) { buttonWasClicked() }If you were doing "classic" Cocoa in the way it was intended, you wouldn't need to subclass anything for a simple button.
You wouldn't even need to write a single line of code, you'd just instantiate said button in Interface Builder, hook it up to a delegate (e.g. a window controller) and off you go. You can create a hello world example with a handful lines of code.
And even if you'd rather create the button programmatically, it's not much more involved.
Sure, if you're coming from Win32 and expect to program Cocoa without learning Cocoa, you're out of luck. But I guess that applies to all frameworks.
https://learn.microsoft.com/en-us/security-updates/securityb...
I mentioned in another reply the 12 different ways that you had to define a string depending on which API you had to call.
Can you imagine all of the vulnerabilities in Windows caused by the layers and layers of sediment built up over 30 years?
It would be as if the modern ARM Macs had emulators for 68K, PPC, 32-bit x86 apps and 64K x86 apps (which they do) and had 64 bit Carbon libraries (just to keep Adobe happy)
Once I became experienced enough to have opinions about things like my editor and terminal emulator... suddenly the Visual Studio environment wasn't nearly as appealing. The Unix philosophy of things being just text than you can just edit in the editor you're already using made much more sense to me than digging through nested submenus to change configuration.
I certainly respect the unmatched Win32 backwards/forwards compatibility story. But as a developer in my younger years, particularly pre-WSL, I could get more modern tools that were less coupled to my OS or language choice, more money, and company culture that was more relevant to my in my 20s jumping into Ruby/Rails development than the Windows development ecosystem despite the things it does really well.
Or to say differently: it wasn't the stability of the API that made Windows development seem boring. It was the kind of companies that did it, the rest of the surrounding ecosystem of tools they did it with, and the way they paid for doing it. (But even when I was actually writing code full time some corners of the JS ecosystem seemed to lean too hard into the wild west mentality. Still do, I suspect, just now its Typescript in support of AI).
The biggest problems were DAO (database) and a few COM controls that were not available in x64.
You can pick one or the otherfor Windows too, so don't ask me why it's done that way. It was originally so you could compile for both the new hotness Unicode, and the old compatible ASCII.
But then Large Address Aware (4GB limit) changes everything, and you can't do that anymore. In order for a program to be Large Address Aware, you need to not try to do things like check high bits of pointers, then every single library and DLL you use also needs to do the same.
Add high DPI to the mix and things get rough very quickly. Also the common control have weird input issues (try ctrl+backspace in an Edit control). All those little things need to be fixed carefully for something to be ok in 2026.
(tongue in cheek)
lol at them still bekng the best option. so much wasted effort trying to replace them
And for HiDPI, https://learn.microsoft.com/en-us/dotnet/desktop/winforms/hi...
> WinForm or WPF, how to choose
and they were like: "the question I have isn't how to choose, but _why_ I have to choose".
https://github.com/dotnet/winforms/issues?q=is%3Aissue%20sta...
Winforms is also .NET based, so it's inaccessible if you don't want to write your UI in and take a dependency on .NET.
Naturally it is a bit more than just drag and drop controls from the toolbox.
HiDPI is supported in modern .NET, with additionally APIs, that aren't enabled by default only due to backwards compatibility.
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.
This is 100% true for all of their techs produced within the past ~20 years, but WPF and Winforms are extremely stable with no real issues.
It's so weird too because most of everything they've done in the past 20 years has basically just been incomplete remixes of WPF. If they just stuck with WPF and extended it onward, something like a UI toolkit equivalent of C#, it would 100% be the gold standard for Windows development today, and perhaps even UI development in general if they open source/standarded it.
Stable, but many issues. Stay away if you value your sanity and do anything nontrivial.
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.
Web apps cause have lots of trouble emulating proper native look and feel and often have wierd issues with things like consistent focus and keystroke navigation. They have all the dumb issues of Java apps with no improvements beyond not being Java and are slower and more memory heavy to boot!
It's a grave sin to have an app repo without a screenshot in the main README.md.
Note: Yes, I know that electrobun itself has videos on the README.md
Also, they stopped caring about Windows because they want recurring service revenue. Making Windows a subscription service for consumers would outrage the users (even though they kinda already do this for business with Microsoft 365). So the consumer market is just viewed as a billboard for M365 and Copilot. So everything you see there is just lowball effort, even worse than their normal quality.
It's demonstrably possible. And further, why does what some portion of Microsoft, a huge, multi-headed beast, does qualify as the bar for what is reasonable for users to expect?
The multi-headed beast has been assimilated by web-tech. They can't code GUI C++ no more - except their compiler/graphics team. And even the latter are dying.
If doing native apps was realistic then I’d expect windows, Microsoft, etc to also do them.
same expectation as always.
So many “let’s race-to-the-bottom along with the authority” comments on HN lately.
Dude: no! =]
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.
> Native means system libraries only.
Every non-trivial application will eventually use third-party non-system libraries.
I think "Native app development" has at least two meanings:
1. narrow meaning: the program uses a native UI toolkit (Win32, Cocoa)
2. broad meaning: the program targets one or more specific platforms and the UI is not not just a webview
Even with the narrow meaning, WxWidgets would qualify as "native development" (because it uses native UI toolkits under the hood), yet it is still a third-party library.
Since when? To me, anything not webview-based is native, though you have varying degrees of integration into the platform.
Sure, embedded systems are a different anmial...
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…
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…
It's another example of how they have completely abandoned any attempt at providing a good user experience across their products
The author does mention that .NET does have distribution options which don't require the user to install the runtime. You can have it package the full runtime with your build, either as a bunch of files, a self-extracting executable, or a standalone AOT-compiled native executable.
The author mentioned that the AOT-compiled executable is 9 MiB which is unacceptable to them. The other options will need even larger. Personally I don't see 9 MiB as a big deal especially when the author would rather go with Electron which is larger at worst (bundled Chromium) and only inefficient at best (system WebView).
It's just a bad idea. Today we just pack in the DLLs and it just works.
First is that the security model changed with .net 5. Next is that they subsume Mono/.net core into the foundation of the language and this cost them them the ability to support Windows native development, specifically anything to do with Win32 API.
If you look at .net 10 and compare that to .net 5 you can see that they are trying to reintegrate the Win32 API but now it is in the all new Microsoft namespace.
The amount of change is too significant to act as a drop in replacement for the original .net framework. Maybe they could have gone a side-by-side installation, but the rapid development of The NET Framework I think made it too hard to tie to an operating system update. They wanted to free it from that update cycle of once a year or every two years and allow the development to progress rapidly at the cost of having to download it and install it each time.
I don't think the rapid development cycle argument holds water, when they're shipping a new WebView2 every month.
That’s why they had .NET 5im stead of .net core 5
.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.
Ideally they would just install newer .Net releases side by side and uninstall .Net releases as they drop out of support.