logoalt Hacker News

Direct Win32 API, Weird-Shaped Windows, and Why They Mostly Disappeared

55 pointsby birdculturetoday at 9:24 AM19 commentsview on HN

Comments

Sharlintoday at 10:28 AM

Yeah, weird-shaped windows are definitely not something that should make a comeback. Just because you could doesn't mean you should.

> Today, all Windows desktop apps look the same as they are the same; they are all built on crap React, Electron, electronbun, and Tauri browser wrappers that mimic the real Desktop apps.

Desktop apps should look the same because they should use the OS GUI framework; that has nothing to do with React and Electron. I can't quite understand this argument; being webview based enables applications to look different from each other, like websites do, not similar. If they still do look similar, that's a good thing.

> The point was usually not usability. It was identity.

Yeah. And usability is sort of a big deal. Applications that implement their own widgets or color schemes or nonstandard shapes usually pay zero attention to usability or accessibility. They almost invariably lack all standard affordances and disregard the standard UX guidelines.

Also, ironically the applications with the most "identity" today tend to be control panels and other accessories by HW manufacturers bundled with device drivers, and they also happen to be the crappiest, most terrible bloatware that an average user is likely to encounter.

show 3 replies
okanattoday at 11:43 AM

> freaking memory is 77% full when freaking Windows 11 starts up.

Unused memory is wasted memory. 77% is basically caches + private process memory + shared memory. Unless you are comparing by the private committed working set, you usually have no idea of the actual usage. .Net apps and browsers often allocate overcommitted memory to avoid making system calls.

I get it, using browsers for ToDo apps is slow, however measuring their impact is harder than you think. At the same time the best x-platform UI framework is the browser. Qt comes next but it lacks man-decade amount of fixes/polishing to match native font support and text rendering, media handling, accessibility support, hw acceleration and memory pressure behaviors of Skia and Chromium.

show 1 reply
gyomutoday at 11:45 AM

I think those observations get to the crux of the issue:

> That is why weird shaped windows are easy to prototype and expensive to polish.

> But there is an issue with Win32 API programming. And the truth is that custom windows mean doing everything yourself, controlling every Windows message, and that is fragile

Software used to be made by small teams (often of 1). Once released it could be expected to be stable for years.

The priorities have shifted to software that can be built and iterated on quickly, by large teams with high turnover. It’s not uncommon for popular software to get updated weekly, daily.

I suspect this is also why skeuomorphic design lost the evolutionary race - everything needs to be tweaked and aligned and optimized ad hoc. If you want to reorganize the interface, it means potentially recreating a lot of assets. Flat design is interchangeable and modular.

These trends will only get stronger with agentic software engineering - the incentives reward scale and speed.

This is also why we don’t really see large ornate hand carved wooden funiture anymore, it’s all flatpack particleboard now.

show 1 reply
creshaltoday at 10:44 AM

> The point was usually not usability. It was identity.

And we're not even getting usability out of it! Each of those bland react-angles is subtly inconsistent with the OS, with each other, and very often, itself. And in 6 months everything will move around again, for no reason other than to keep the responsible managers employed, without improving UX. And a11y is crying in a corner somewhere, forgotten.

itmiticatoday at 11:40 AM

Talking about choice. The article is presented in non-avoidable dark mode. Enough already! Say it with me: dark mode does not directly reduces the brightness, which should be your main concern, it only masks the brightness, which is BAD!

tdecktoday at 10:21 AM

> The point was usually not usability. It was identity.

Is it bad that when I read that I immediately thought "this was written by an LLM."

show 3 replies
donatjtoday at 11:41 AM

I am reminded of how the CD burning app Disco for Mac would actually smoke while your disc was burning. Standard looking Window but with semitransparent smoke billowing out the top. If I recall, Steve Jobs showed it off on stage and loved it.

iamcalledrobtoday at 11:51 AM

Personally, I find that any Windows application that is remotely polished will have its own win32 WindowProc anyway, even if written in higher-level tech.

For example, if you want custom window controls, you need to use a WindowProc + WM_NCHITTEST to tell windows where the buttons are, so the OS can do things like display the window snapping controls when you hover over the "Maximize" button.

Sidenote: as a designer, its disappointing how many Windows apps are subtly broken in a bunch of these ways. Its not that hard. "Modern" UI frameworks generally don't do this work for you either, there's a real lack of attention to detail.

mauriciolangetoday at 10:21 AM

Some AI slop aside, nice article to help us remember that the platform is much more powerful if we dare to do some things without the crippling framework help.

ahartmetztoday at 10:25 AM

> Win32 does not revolve around an update loop you own

    while (GetMessage(&msg, NULL, 0, 0) > 0) {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
...How much more could you own it, really? Is that the LLM talking?
show 1 reply
NooneAtAll3today at 11:29 AM

is it possible to do this in linux?

show 2 replies
7bittoday at 10:39 AM

This starts out as a rant, wouldn't know how it ends.

It's good weird-shaped windows disappeared. They are a usability nightmare and override what theme that the users wants for himself.

hackrmntoday at 11:12 AM

First, taking the opportunity this discussion presents, I'd like to state for the record, AGAIN, that I have long appreciated the Win32 API and still do -- not because it's great in and out of itself necessarily, it certainly has more warts than your average toad native to the Amazon, but because it de-facto worked for a long while through simple iteration (which grew warts too though) _and_ while it didn't demand Microsoft had everything for _everyone_, it kept Win32 development stable "at the bottom", as the "assembly" layer of Windows development, which everything else was free to build on, _in peace_. Ironically -- looking at the volume of APIs and SDKs Microsoft is churning out today, by comparison, through sheer mass and velocity -- they've proven utterly unable to be sole guardians of their own operating system. There's a plethora of articles shared on Hacker News on this inadequacy on their part to converge on some subset of software that a Windows developer can use to just start with a window or two of their own, on the screen. Win32 _gave you exactly that_. And even `CreateWindow2` export would have worked beyond what `CreateWindow` or `CreateWindowEx` couldn't provide, because you could count on someone who loved it more to just abstract it with a _thin_ layer like WxWidgets etc. Things _worked_. Now there's internal strife between the .NET and "C++ or bust" teams at Microsoft, and the downstream developers are just everything between confused and irritated, this is entirely self-inflicted, Microsoft. It's also a sign of bloat -- if the company could split these groups into subsidiaries, they could compete on actual value delivered, but under the Microsoft umbrella, the result is entirely different.

Second -- and this is a different point entirely -- not two weeks ago there was at least _two_ articles shared here which I read with a mix of mild amusement and sober agreement, about the _opposite_ of what the author of the article linked above, advocates for -- _idiomatic_ design (usually one that's internally consistent):

* https://news.ycombinator.com/item?id=47738827 ("Bring back Idiomatic Design")

* https://news.ycombinator.com/item?id=47547009 ("Make macOS consistently bad unironically")

What I am getting at is that this is clearly different people vocally preferring different -- _opposite_ -- UX experiences. From my brief stint with graphic design, I know there's no silver bullet there either -- consistency is on some level in a locked-horns conflict with creativity (which in part suggests _defiance_), but it's just funny that we now have examples of both, with the above, to which I should add:

> This is why we can't have nice things!

Also, while we "peasants" argue about which way good design should lean -- someone likes their WinAmp-like alpha-blended non-uniform windows and someone else maintains anything that's not defined by the OS is sheer heresy -- the market for one or the other is kept well fueled and another round on the carousel we all go (money happily changing hands).

For my part I wish we'd settle, as much as settling can be done. The APIs should support both, but the user should get to decide, not the developer. Which is incidentally what CSS was _ideally_ kind of was supposed to give us, but we're not really there with that, and I am digressing.