Live data from Hacker News

Writing GUI apps for Windows is painful

tulach.cc

51–60 of 577 posts

Re: Writing GUI apps for Windows is painful

#51
post #33

Earlier quoted context omitted.

C# with WPF or WinForms only seems nice in comparison to other relatively painful tools IMO. The old RAD graphical tools and newer ones like Rebol (that are now dated) show just what is possible. Mathematica is also pretty powerful and doesn't require a ton of code.

Totally agree with this. I’ll get shot for this one but I write most of my GUIs in Excel these days.

Do you mean Visual Basic for Applications? How are you creating a GUI in Excel?

Re: Writing GUI apps for Windows is painful

#52
I'm teaching myself the Win32 API for a future RE project, thinking that knowing it helps with the reverse engineering effort. I have just achieved creating a window, loading a text file and printing it on the main window. Scrollbars are there but don't work yet.

It actually take s a lot of work. The boilerplate code is OK but I never realized that showing strings on Windows is such a PIA. I have deep respect for anyone who wrote Windows GUI apps back in the late 80s -> early 90s before RAD is a thing.

As a side note. I recently got a book about WinG game programming on Windows 3.X/95. I remember back in the day the game Fury3, a fascinating 3d flight shooter game, was developed in WinG. It could be an interesting archeology project to develop something serious with WinG, the predecessor of DirectX.

Re: Writing GUI apps for Windows is painful

#53
I don't do a lot of desktop apps but for simple GUI apps I've been using Python and Pywebview, with packaging left to Pyinstaller. The main reason is that I get to reuse the python/javascript/css libs that I know, and it's easily portable. I'm sure a native app uses less memory and cpu but frankly what I get with this combination is not that resource hungry. In fact, anytime something goes south it's my fault for using poor algos. Also, there are tons of great GUI libs and web components.

Re: Writing GUI apps for Windows is painful

#54

More accurately: + "portable" (single exe with no automatic unzipping of dlls or anything) + commercial and unwilling to redistribute compiled object files (which together with the "portable" requirement, means no LGPL) + dark mode Windows GUI apps is painful. Drop any one of these requirements and there are good established options. Specifically I think most "portable" applications use win32 because, usually, portab…

> Windows GUI apps is painful. Drop any one of these requirements and there are good established options.

The "portable" one is not a hard requirement. It's a whimsical self-imposed constraint, which makes as much sense as complaining that you can't stand on your right foot on Tuesdays. All installer toolkits released in over two decades support deploying arbitrary components. Is this not a solved problem?

WinUI3 supports dark mode/theming out of the box along with fully customizable styling. It's as free as it gets. It's also Microsoft's official GUI framework for Windows. But the blogger rejects it because... Because what?

Re: Writing GUI apps for Windows is painful

#55

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…

Dear ImGui is for development/debug tools, not an UI for the end-user. It's great for small projects as long as you don't care about accessibility, or proper keyboard support, or adherence to standard UI conventions, or support for devices without GPUs, proper font rendering, etc. ...

Re: Writing GUI apps for Windows is painful

#56
post #8

Earlier quoted context omitted.

Depending on if he lives in a apartment some country/cities have laws against doing any work in the appartment that impacts the outside without permission from the house owner. E.g. you can buy a heatpump but you can't drill the hole in the outer wall. In germany and austria most if not all windows also either open fully to one side or basically bend inwards so you can't install the ac units you install directly into…

Are portable AC units not available in Europe? They are inefficient but can sit inside next to the window and only require that you partially block off a window opening.

They are available

Re: Writing GUI apps for Windows is painful

#57

Writing GUI apps for Windows in C++ is painful There, fixed it for ya. There are solutions if you're not hell-bent on using C++, be it .Net, Lazarus (FreePascal) or Delphi. We're using Delphi at work and for the most part it's super simple and easy.

> Writing GUI apps for Windows in C++ is painful

I don't think so. Qt makes this a trivial problem, and WinUI3 supports C++ as a first class citizen.

I'd argue that desktop development for Windows was never as good as it is right now.

Re: Writing GUI apps for Windows is painful

#58

I'm working on a GUI toolkit that should match the requirements: Slint - https://slint.dev Can be compiled statically in a single .exe that is smaller than 40M. Has a license that allow proprietary on desktop for free. Has dark/light styles. Even comes with a (work in progress) drag and drop WYSISYG editor.

[flagged]

Re: Writing GUI apps for Windows is painful

#59
post #35

The solution you end up with will be a compromise on your requirements. E.g. if you can compromise on the 40MB size requirement then Electron should be a good fit to cover all your other requirements. Microsoft has developed VSCode with Electron. https://www.electronjs.org/

> if you can compromise on the 40MB size requirement then Electron should be a good fit to cover all your other requirements.

Microsoft also supports React Native, which is arguably way better than any webview-based approach.

Post reply on HN