Live data from Hacker News

Writing GUI apps for Windows is painful

tulach.cc

421–430 of 577 posts

Re: Writing GUI apps for Windows is painful

#421

Earlier quoted context omitted.

WinUI3 is a can of worms that’s becoming palatable only with .NET 8 (and soon 9). In a normal configuration, you have to bring 500MB of dependencies with you, or ask the user to install a redistributable. You also need the user to install .NET 8, or bring said 0.5GB with you. WinUI3 can be used in unpackaged apps (I.e.: not appx) but has a few random caveats that just don’t work; random APIs that have a footnote of “…

I don't understand why Microsoft puts it on the user/dev to make sure their own dependencies and "VC redistributables" are installed. Like shouldn't Windows 11 just either have that already or pull it down as needed as it's an official MS library. Feel I always hit a roadblock when setting up a new PC where one of the things needs that but the dev didn't provide it and I have to get it myself. Which feels weird when…

> Like shouldn't Windows 11 just either have that already or pull it down as needed as it's an official MS library.

In this day and age of everything always connected, some things still aren't always connected.

Re: Writing GUI apps for Windows is painful

#423

Earlier quoted context omitted.

Say what you will about VB6 but it was stupid simple to get GUI apps up and running.

It was stupid simple to get simple GUI apps up and running. More complicated apps were impossible. But, I think that's exactly what's missing in the Desktop GUI market right now. Webapps are incredibly easy to start apps with. You only need to know a few things and you can pick up the rest later as your app gets more complex. Modern desktop GUI systems are incredibly complicated, in comparison, just to open the windo…

Later versions of Visual Studio with custom controls and other abstractions made fairly complex GUIs entirely doable and still pretty fast to build.

Then they shit canned everything for Xaml around the same time the whole industry abandoned any kind of WYSIWYG or rapid development technology.

Re: Writing GUI apps for Windows is painful

#424
post #414

Earlier quoted context omitted.

'Qt for Application Development Enterprise - Small Business (ADE-SB)' is $499.

You're right. I didn't see the Small Business tab when I was quickly looking through it. Still ends up being a blocker when you're not sure how many copies of the product you'll sell.

I guess that is just one of the many risks you have to take if your trying to build a business. A couple of hundred dollars in licensing fees are not going to sink your product. For a side project that you don't expect to make any money it might be too much, but in that case you could just as well open source the project.

Re: Writing GUI apps for Windows is painful

#425

For requirements like that, I typically write WPF C# frontend, combined with C++ backend. Compared to ImGui, in WPF you’ll get a GUI designer, styling which allows easy dark mode, data bindings, data templates, animations, IDE support like live visual tree inspector, accessibility support, and more. If you use the legacy .NET 4 framework, the .NET runtime will come pre-installed on modern Windows. If you compile your…

I have been trying to learn WPF for a long time, but have drifted into web apps.

Can you point me to any good resources to be able to make complex multi window apps in it?

I have good experience in Windoes forms and am well versed in c# and dotnet.

Re: Writing GUI apps for Windows is painful

#426
post #342

Like the author I too did an evaluation of various UI frameworks, though I ended up settling on WTL (Win32 with some ATL). I might switch away from it and make my own Win32 wrapper in time but for now it works well enough and writing custom controls that feel like standard controls is relatively easy. If you handle the drawing correctly it is also one of the fastest and snappiest systems around. I had the exact same…

Why do you think Qt isn't fast? Qt apps can be VERY fast. My block editor[1], written in Qt C++ and QML is 4x faster than Bike - a native macOS app - that is already very efficient and performant.

[1] https://www.get-plume.com/

Re: Writing GUI apps for Windows is painful

#427

Problem: It is extremely hard to stylize native Win32 controls. That's not a problem, it's a feature. I am absolutely bloody sick of apps that go out of their way to reinvent the standard UI controls in perplexing ways and behave unexpectedly. Following the system UI preferences is what you should do, and it irritates your users if you don't. There is a “hidden” dark mode for Win32 controls used by Windows File Explo…

As a non-Windows user, I'm confused, maybe you can clarify: > If you use the regular Win32 controls then they will automatically get the styling the user has set. Does that mean they'll get dark mode if the system is in dark mode? In which case I don't understand what the author is complaining about. Sounds like dark mode would be working as intended. They want "easy styling" but I took that to mean things like icons…

No, they won't get dark mode and this is the biggest problem for Win32 UIs now. If Microsoft would make dark mode available for classic Win32 apps, it would meet all requirements of the original poster.

Re: Writing GUI apps for Windows is painful

#428

This is a good overview of some of the options, but the author’s specific requirements push it in a specific direction that eliminates a lot of options. Specifically, the requirement for completely custom GUI styling without writing his own render functions means it’s really a task of selecting easy, customizable GUI libraries rather than generic GUI work. The requirements to be self-contained executables and under a…

> he didn't want to pay for a license

Well that's the killer right there. I too think it's way too painful to write Windows UI, especially if you want to stay away from Electron (which you should in almost all cases), but refusing to pay money for good software is going to severely hamper your goals in 99% of cases.

Re: Writing GUI apps for Windows is painful

#429

Earlier quoted context omitted.

This indeed. Custom UI widgets for Windows apps are really not necessary most of the time, and fitting in with the system theme is all you ought to aim for, most of the time. There are exceptions, for very rich dense UI, for UIs that need to be cross-platform, but if you're writing a Windows app, it should look and feel like a Windows app.

> and fitting in with the system theme is all you ought to aim for, most of the time Even Microsoft struggles with that.

Only because they change the system theme every 45 minutes.
Post reply on HN