NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Windows native app development is a mess (domenic.me)
cv5005 1 hours ago [-]
I'm an embedded programmer who occassionally needs to write various windows programs to interface with embedded devices (usually via serial port or usb), and I find it a breeze to write native gui programs in pure win32 and c++.

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?

user____name 39 minutes ago [-]
I feel like I'm the only person in the world who would rather write ugly win32 jank for the rest of my days than ever having to touch an "elegant" or "well structured" Cocoa codebase. In win32 if you want a button you call a function and pass a hande, in the Apple world you first subclass 7 interfaces in some unreadable Smalltalk-wannabe syntax and pray you don't need to access the documentation. And of course they constantly change things because breaking backwards compatibility is Apple's kink.
cosmic_cheese 32 minutes ago [-]
That feels like quite the exaggeration. If all you want is a button, all you need to do is initialize an NSButton and then tweak a few properties to customize it as desired.

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.

samiv 44 minutes ago [-]
To me this kind of "no need to change anything" implies stability but there's a younger cohort of developers who are used to everything changing every week and who think that something that is older than week is "unmaintained" and thus buggy and broken.
raw_anon_1111 30 minutes ago [-]
And the 12 different ways to define a string depending on which API you call
jordand 54 minutes ago [-]
The one big challenge I've had with big legacy Win32/C++ codebases is migrating it fully from 32bit to 64bit. Loads of know-how and docs for complex GUI controls and structs are lost to time, or really fragmented. Other than that, yeah it really does all just work once you're past that.
cv5005 50 minutes ago [-]
Well it's still a 32 bit program so I guess that helps. Would probably require some porting to make it 64 bit native, but as long as you use the WPARAM, INT_PTR typed and what not correctly it 'should just work'.
jordand 38 minutes ago [-]
Yeah that's the bulk of the work for migrating small Win32 apps. Things escalate when someone has built their own dynamic GUI framework over Win32, used a range of GUI controls, and then built event-driven apps on top of that, it's a lot lol
mschuster91 49 minutes ago [-]
Doesn't WINE have pretty decent documentation by now from all the reverse engineering?
jordand 32 minutes ago [-]
Win32 programming has been reduced to a small niche now. Even 20+ year old Win32 books don't cover things in-depth (or practical use cases) let alone the 32bit->64bit migration
sourcegrift 45 minutes ago [-]
Wine cannot even install office 2014. It's not really as food as some claim sadly.
anthk 28 minutes ago [-]
Lutris can up to 2016.
lucianbr 53 minutes ago [-]
How does it look? I mean, what do the widgets look like?
cv5005 48 minutes ago [-]
This was an MFC project, so your old standard win32 common controls that looks the same since 98 or so.
tsss 19 minutes ago [-]
Honestly, your GUIs are too simple to be part of this conversation. Try writing something like Spotify in WinAPI and that's not even a complicated GUI either.
LAC-Tech 58 minutes ago [-]
Winforms?

lol at them still bekng the best option. so much wasted effort trying to replace them

pjc50 54 minutes ago [-]
Winforms is great until you try to make windows dynamically sized, or deal with DPI nicely. In every other regard it's still fine, and for accessibility actually _better_ than many subsequent frameworks. And produces nice small fast executables.
HauntingPin 51 minutes ago [-]
I assume that if Microsoft hadn't abandoned WinForms for the next thing, it would support dynamic sizing and DPI properly. It's mindboggling how much time and effort they've wasted coming up with new GUI frameworks instead of just improving on what they have.
20 minutes ago [-]
wolvoleo 1 hours ago [-]
> And from what I can tell, neither are most developers. The Hacker News commentariat loves to bemoan the death of native apps. But given what a mess the Windows app platform is, I’ll pick the web stack any day, with Electron or Tauri to bridge down to the relevant Win32 APIs for OS integration.

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.

aaomidi 21 minutes ago [-]
When Microsoft themselves use electron to develop apps what expectations can we have on other devs?
sylens 47 minutes ago [-]
Author raises several good points. Why isn't the latest .NET runtime pulled down into Windows 11 devices via Windows Update? Why isn't there a better path forward for deployment?

It's another example of how they have completely abandoned any attempt at providing a good user experience across their products

c-linkage 9 minutes ago [-]
There are a few reasons that I can see why they don't integrate the latest .net.

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.

rwmj 18 minutes ago [-]
This is quite timely as we need to write a simple UI for Windows (a few buttons, status, maybe a file menu). The main constraint is it must compile to a single binary (.exe) with no dependencies such as runtimes, DLLs, languages etc. It also needs to run on some older unsupported Windows systems, probably Windows >= 7, 32 bit.

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?

kwanbix 6 minutes ago [-]
Delphi or Lazarus (https://www.lazarus-ide.org) should solve it.
samiv 46 minutes ago [-]
Seems to me that really the simplest solution to authors problem is to write C++ safely. I mean...this is a trivial utility app. If you can't get that right in modern C++ you should probably just not even pretend to be a C++ programmer.
ashwinnair99 1 hours ago [-]
It has been a mess for 15 years and Microsoft keeps making it worse by adding new frameworks without retiring the old ones. Win32, WPF, WinUI, MAUI. Nobody knows which one to pick.
Smalltalker-80 1 hours ago [-]
Yes, and the hubris sting-of-death was UWP. They tried to make Windows into a mobile OS, severely restricting the alowed actions of programs, including strict certification to be able to run them (elsewhere). Of course nobody went for this and UWP died a quiet death. Recently there are signs that MS is trying to go back to making products that users actualle want (Win11 reverts). We'll see...
pdpi 1 hours ago [-]
> (Win11 reverts).

I must've missed that one. What did they revert?

lpcvoid 55 minutes ago [-]
It doesn't matter - what Microslop says and what they do are traditionally very distinct things.

But in case you want to read yourself: https://blogs.windows.com/windows-insider/2026/03/20/our-com...

Traubenfuchs 48 minutes ago [-]
"File explorer launch experience" -hard to tell if this is satire…
mschuster91 48 minutes ago [-]
> without retiring the old ones

They'd lose too much enterprise software that's not being maintained any longer but still is business critical.

You can still run most programs from the Windows 95 era unmodified on a modern Windows 11 machine and a lot of things is relying on that under the hood.

PaulKeeble 27 minutes ago [-]
Most of the desktop applications I have wrote over the years have been in other languages like Java and Go as I have wanted them to mostly be cross platform. In these cases I have always used the Software UI, which in Java is Swing and in Go is Fyne. These are usually reasonably fast, don't necessarily look native depending on how its themed but ultimately fit the language better than trying to bridge to Win32 or GTK/QT.
intrasight 1 hours ago [-]
"So when I went to work on my app, I was astonished to find that twenty years after the release of WPF, the boilerplate had barely changed."

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.

fsloth 46 minutes ago [-]
"I've always been surprised that Microsoft didn't do a full operating system refactor and provide a compatibility layer for running old binaries"

Just keeping a legacy system in working order is different skillset than writing a new system from scratch.

So you need a new team. Nothing from Windows maintenance transfers.

Maybe would require hiring someone who knows how to design an OS.

It would be a major undertaking, needing protection by CEO (and if it would not succeed CEO would loose a lot of prestige).

I'm not saying MS does not have the existing talent base. I don't _know_.

But I've been inside a house maintaining a monstrous legacy codebase.

I can tell you - it requires surprisingly little deep understanding just to keep an existing system going.

delduca 1 hours ago [-]
Best framework for this is Qt.
hliyan 14 minutes ago [-]
I've recently discovered FLTK: https://www.fltk.org/doc-1.4/intro.html

Haven't used Qt in a while, but at first glance, seems simpler: https://github.com/fltk/fltk/blob/master/examples/menubar-ad...

jordand 45 minutes ago [-]
Yeah for my work, legacy Win32/WinForms/WPF codebases tools are kept maintained as-is, but new tools are usually written in PySide6 (QtWidgets or QtQuick) and it's worked out really well (other than bundling/distribution being tricky for big apps)
anthk 22 minutes ago [-]
And Lazarus/FPC.
madduci 1 hours ago [-]
MFC is rock solid too
ozim 1 hours ago [-]
That is why everyone even Microsoft themselves does Electron.

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.

Boxxed 49 minutes ago [-]
I don't know, I think it's pretty embarrassing that Teams is an electron (or whatever) app. The plot on native has been lost so badly that even the fucking company that makes the OS doesn't want to deal with it.
pier25 51 minutes ago [-]
Isn’t Microsoft also using React native for desktop stuff?
anthk 24 minutes ago [-]
NPM it's the bigger turd happened ever, slow and bloated. And JS today amounts the biggest enforced propietary loading method of existence in almost every web page.

Open? You wish.

>and not locked into any single big tech.

DRM and propietary cody tells me otherwise.

ToucanLoucan 1 hours ago [-]
Clown shit. “We’re made our own OS a nightmare to build on so we’re gonna use JavaScript powered pseudo-VMs and make everything take 2 gigs of ram minimum”
bentt 59 minutes ago [-]
I wonder if Unity (the game engine) actually has a sneaky potential here. It’s cross platform, fast, and maybe just maybe less bloated than carrying around an entire browser like Electron?
Vedor 49 minutes ago [-]
Not sure about Unity, bot Godot is already used to build tools, like Pixelorama (pixel art graphics editor, a bit akin to Asesprite), RPG In A Box (game engine targeted for RPG games), Bitmapflow (tool to generate in-between animation frames), and probably more I don't know about.

Well, if I remember correctly, the Godot editor is written in Godot.

v9v 54 minutes ago [-]
I think Godot is a possible contender as well. There are a few non-game applications made with it, and they've recently added a docs page tailored to non-game application development: https://docs.godotengine.org/en/stable/tutorials/ui/creating...
fsloth 49 minutes ago [-]
Sure but different target market.

CRUD apps are non-trivial.

If Unity were to ship platform native replacement for WPF equivalent (hell or even winforms) it would become a really enticing app development platform.

pier25 52 minutes ago [-]
Flutter is probably better suited for apps
jordand 50 minutes ago [-]
Unity has a big runtime that needs to be bundled with it to run
moron4hire 47 minutes ago [-]
Unity's 2D UI stuff is very poorly designed, with lots of edge cases where auto-calculated fields can hit a divide-by-zero issue and then become unrecoverable because the value is now NaN which can't be auto-calculated back to a number.
irishcoffee 39 minutes ago [-]
Just use Qt. Native, cross-platform, works like a champ.
netbioserror 52 minutes ago [-]
Speaking from personal experience, Godot has the sneakiest potential. It has all the UI components and flexible layout containers you could ask for, a signaling system that lets you put the methods from less relevant components in the scripts for more relevant ones (making for a more compact project), and you can also manually compile slim template builds for cleaner distribution. There's a future there.
hofrogs 48 minutes ago [-]
There are already tools made in Godot, including the godot editor itself. This page has some of them: https://gamefromscratch.com/godot-developed-non-game-applica...
lpcvoid 54 minutes ago [-]
Lazarus is crazy good, as is Delphi, if you can afford it. wxWidgets is also nice, without the licensing weirdness that is Qt.
steve_taylor 34 minutes ago [-]
Lazarus is probably the easiest way to make a lean and fast native Windows app without paying for tooling.
livinglist 40 minutes ago [-]
Still remember the days of writing apps for windows phone using c# and XAML. Good old times but no definitely don’t wanna go back.
whobre 48 minutes ago [-]
Interestingly, no mention of WTL
domenicd 25 minutes ago [-]
Ahah, I knew I missed one!

I originally had ATL in there, but my proofreading squad (Claude and ChatGPT) told me that ATL was a more niche thing for COM, and looking at the Wikipedia article I was convinced they were right.

But WTL was what I was thinking of---the step between the MFC and .NET that I forgot.

anthk 53 minutes ago [-]
Given the size of some Electron software, bundling TCL/Tk with IronTCL and TCLLib+TKLib weights 58MB and you can develop your own software with it, and that with the source of everything included.

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.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 14:06:41 GMT+0000 (Coordinated Universal Time) with Vercel.