by userbinator · 8mo ago · 0 comments
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.
MacOS is slightly better but Apple's anti-competitive practices targeting developers makes it a tough sell. Linux is better still, technically, but due to the fragmented desktop environment landscape and distribution difficulties, it's also a hard sell.
I think it's fair to say that the entire story for native app development is a mess - which is most likely why Electron became so popular. There just isn't a practical sane alternative.
When I look at the apps on Windows, all I see are abandoned projects and MVPs with a borderline malware financial structure.
Microsoft has had even more people working on Windows software..
Microsoft has always had vastly more developers and development of software for Windows.
Apple still after all these years has a tiny market share of overall platforms, software, all of it really.
Not sure how you can suggest Apple is somehow the bastion of software development. If you write mac software, you'll be targeting a platform with 15-20% market share at best.
I've been a fulltime Linux user for years but there are tons of excellent Windows-only apps.
Here are some that I miss: Directory Opus, ShareX, Wiztree, Everything, AltDrag, AutoHotkey, Paint.NET, irfanview, SumatraPDF. I'd add Keepass2 as well but fortunately KeepassXC is a thing.
Those are all feature-filled (in the bloat-free good way) and they've all been around for over a decade (from memory). Most are free and open source to boot.
Also, I am pretty sure that SumatraPDF is available for Linux as well. I am not at a computer but I think it is in the AUR.
But I agree that most of the boutique stuff on Windows gets drowned in all the enterprise software a bit.
With electron this is much easier because nothing is native and it looks and feels just like the website.
Of course, if one is a web developer, even attempting such a feat this could result in a brain-melting experience.
MacOS is not quite so simple: https://news.ycombinator.com/item?id=40085237
Pure C is not the native way to do application programming on macOS. As I mentioned elsewhere, you can bring up a window with a button with no code on macOS. You can make that button show a string on a label with a handful lines of code.
> Don't be swayed by the propaganda. Especially if your application has essentially no untrusted input.
Even without untrusted inputs, in 2026 one should think twice before selecting C++ for a new project. There are still some reasons to do so, of course, but Win32 isn't one of them -- one can use it from a memory safe language just fine, e.g. https://github.com/microsoft/windows-rs
Using win32 from Rust is nonsensical. This is the kind of use-one-tool-for-any-job Visual Basic 6 programmers used to have, except VB6 would have actually been much better than Rust at Windows programming.
Anyway, Microsoft is the one providing the Rust crate(s) I linked, and according to the releases it seems they are using them internally too. I do not see what is "nonsensical" about using them, and I have used them in the past just fine, just like I used Win32 from C++ in the past.
https://crates.io/crates/windows-sys
https://crates.io/crates/windows
Both seem to do the actual work in unsafe blocks, so I guess you could as well use C++, no? (only have limited Rust knowledge)
The first thing you want to ensure is that you avoid unsafe in YOUR code. That is, after all, where you are going to create your bugs.
Ideally, there is no unsafe code in the crates you use. If there is, at least there are more eyes on that code to catch problems. You can inspect and debug that code, and others can do it for you. Others may battle test it and stress it far more than you will.
And at least the unsafe code is isolated to a few areas in the supporting libraries. Less to inspect. Less to debug. Fewer places to introduce memory related regressions.
It does not at all follow that, given an unsafe block, we may just have well used C++.
The unsafe code is written inside the library, which the user can contain in a safe API. With C++, the entire codebase is unsafe.
Yes, you may be harmed by proper IDE and debugging experience via Visual Studio.
But that would not make me pick C++ over Rust. Other requirements may.
https://github.com/microsoft/windows-app-rs#this-repository-...
I'd say it's confusing but I wouldn't expect any different from Microsoft.
IIRC Borland Delphi was the most popular tool back then for making Win32 apps since it was so easy to use.
Unironically the answer is yes. I've been watching this for at least 15 years.
I think one inflection point is when everybody who was coming up became accustomed to GC languages. Within a decade of that trend starting, nobody could reason about memory anymore.
With the AI boom we're going through another inflection point. When coding is synonymous with using an LLM, nobody will be aware of how anything works (or doesn't)
AI has accelerated this because it's becoming harder to detect the frauds.
From Android to whatever web framework they’re peddling as development solutions, these are not designed for efficiency, but for time-to-market and consumption by front-end developers.
There is a certain amount of truth to that I think
I do not think anybody was “smarter”. There were smart and less smart people then and now.
But the “typical” practice changes. And that changes what you get. I think your “typical” programmer is more productive today in terms of what they can accomplish. But that work is going to be built at a higher level of abstraction and likely a lower level of run-time efficiency. As a percentage, fewer people understand or take into account the lower level details.
It is not just about new tech. After all, I can write all my code in RISC-V assembler. And I can manually allocate memory and manipulate pointers in C#. It is just not what people normally do these days.
The average programmer back then was probably far more knowledgeable of the low-level details.
It was a matter of having access to the right (although limited) resources such as Petzold’s book, Codeproject and experimentation. There was no big rush, no start-up hustler mentality and most importantly hardware resources mattered a lot and it was a point of pride to create efficient software.
The development culture of present time is the opposite of that: developers are drowning in documentation, the default solution is technically inferior and the hustler mentality’s dominating.
The main function of the app being discussed here is to draw solid black rectangles on the screen.
Don't forget the "average person", I'm assuming someone relying on software as a tool, doesn't care about the stuff "designers" seem to obsess over, and will actively hate if you break their workflow by doing things like adding useless padding that makes them scroll more or shows less information in the name of "modernity". There's a lot of specialized niche software for various industries, often very expensive too, which looks like it came out in the early 90s. As long as it works well, users won't complain.
Would that UI be hard to accomplish?
Win32 provides its own components which are basically Win95 style apps, and you can draw the components using some graphics APIs by yourself.
The whole native development area is a mess exactly because making your own (decent) renderer is a huge undertaking.
But that "modern" style is... disgusting and repulsive. That whole dialog is bigger than one of my monitors due to how much wasted space it has.
We did a UI refresh at one point. It looked much nicer. People hated it. We had to hastily redesign it again and it looked far more like the original.
Case in point, the Dropbox Simplified Desktop App was a huge improvement for me. It nails just about everything I ever needed their app to do, and removes all the user-hostile fluff I never asked for. Similarly, I found Windows 11 Enterprise IoT LTSC to offer an improved desktop experience compared to traditional Windows, thanks to its exclusion of a lot of the cruft Microsoft otherwise shoves down the throats of users who, as far as I can tell from frank discussions with many of them, likewise actively don't want.
I'm not saying your desire to make your app look polished means it's crap, but beauty is in the eye of the beholder. Just like fashion, I wouldn't be surprised if we see a shift in the aesthetics trend as more people discover a retro feel sometimes signals a better user experience.
Several integration points like this have been removed, supposedly because third party software was just too bad in how they used them, causing issues. Or at least so goes Microsoft's perspective. Personally, I find that very believable! If by integration points the only thing one can imagine is calling into random third party code on the regular that the user has installed, bang spank in the middle of critical user flows, on the same thread and in the same process as itself, that's exactly the kind of grief I'd expect to occur...
If only there was a way to provide a way to craft e.g. custom flyout menus for the taskbar or custom pages in the Settings app, without invoking arbitrary third party code and possibly causing crashes and hangs in system apps and menus... or just not letting crashes and hangs affect the application (e.g. Windows Explorer) calling them in the first place.
Then there's the removal of title bars from Windows. You often have no idea what app you're looking at. Pull up a PDF in Acrobat and also in Edge. Now, at a glance, which is which?
Regressive garbage.
they did what??? [i'm still on 10 because 11 won't run on my laptop </3]
Here's the source code for those who are interested: https://github.com/sergeax/stamputty
The hard parts were seeded by Claude Code. Happily maintaining and modifying it for close to 3 months now. Just a data point, especially about not needing C++.
>
Don't be swayed by the propaganda. Especially if your application has essentially no untrusted input.*Eh. I spent many years writing cloud/backend software on the JVM, in between stints writing desktop software. When I was first writing desktop software, it was all in C and C++, and I got used to it, but it wasn't pleasant.
When I came back to writing desktop software in C again (just a few years ago), after writing in memory-safe languages for so long (Java, Scala, Rust, Go), I found going back to C to be just so tedious and annoying. It's just incredibly unpleasant to be chasing down segfaults and data races and crap.
So I think saying it's a "crime" is hyperbole, but even for apps that don't have untrusted input, it's still much more pleasant writing in a language that doesn't let you write memory safety bugs.
(Absolutely agree with you on how it's possible to make nice, small, non-trivial Win32 apps, though I haven't done Windows app development in a couple decades. But I think a lot of people would save themselves a lot of time and headaches if they reached for .NET or something higher level.)