Live data from Hacker News

Writing GUI apps for Windows is painful

tulach.cc

71–80 of 577 posts

Re: Writing GUI apps for Windows is painful

#72
post #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. ...

imgui offers incredible development speed. And I've used it many times with great success. It's unorthodox yes (and there's a long-open bug I won't talk about again) but it's dear to my heart. It's like MFC on steroids: You don't have to leave C++.

But yeah at least a few of those caveats remain. Although keyboard navigation and font rendering have quite a bit of support.

Re: Writing GUI apps for Windows is painful

#73
post #66

Earlier quoted context omitted.

> 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. The blogger sounds like they put up a bunch of arbitrary constraints that in normal circumstances wouldn't even be issues. In the process it's those arbitrary whimsical choices that reject the very obvious choices along with any happy path. For example, it's baffli…

Isn't the issue with Qt exactly what the GPL intended? In that case, any Qt fork would force him to also comply with the GPL, and supply the source code of his project.

LGPL. Which eliminates his requirement for a single executable. With LGPL you are only allowed to link dynamically.

Re: Writing GUI apps for Windows is painful

#74

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 any…

IIRC WinG was basically a way to set up a GDI device context that corresponded to a frame buffer, so you could take your DOS SuperVGA code and run it under Windows, only redoing sound and input. It's been almost 30 years though. :)

Re: Writing GUI apps for Windows is painful

#75
post #13

The painful bit is C++. I did a fair bit of that going back to MFC. Knocking stuff out in C# with WPF and WinForms was quite nice in comparison. I haven’t found anything nicer.

> The painful bit is C++. I did a fair bit of that going back to MFC.

I'm sorry but referring to MFC while referring C++ is a telltale sign you don't really have any meaningful experience in the field. Developing GUI apps for Windows is a breeze with frameworks like Qt. You only suffer if you're a masochist, but the rest of us prefer to pick things that make sense.

Re: Writing GUI apps for Windows is painful

#77
I have ideas about writing a GUI framework [1], but why in the world would I spend the time to make it up to the author's standards unless someone was paying me?

GUIs are a lot of work. People should be more willing to pay for work like that. Wanting everything free is one reason Big Tech has so much control.

[1]: https://gavinhoward.com/2024/05/a-new-architecture-for-a-gui...

Re: Writing GUI apps for Windows is painful

#78
post #61

As of Sciter and "antialiasing" issues mentioned in the article... Author did not enable high-DPI support in his/her application. As simply as that... Either in Visual Studio : https://sciter.com/wp-content/uploads/2024/06/high-dpi-aware... Or by including proper manifest: https://gitlab.com/sciter-engine/sciter-js-sdk/-/blob/main/d... That actually is explained in "Hello C++" tutorial: https://sciter.com/hello-cpp-t…

Sciter desperately needs an evangelist who can reply and help people with their problems and just in general provide support and work on the ecosystem. I think from what I remember from indiehackers you are not there yet to be able to afford it but we desperately need that.

Even paying pravic to keep the libraries for different languages up to date would be of great help.

Re: Writing GUI apps for Windows is painful

#79

While it’s a bit cumbersome, he doesn’t really point out any major flaw with the WinForms/WPF ideas, other than of course requiring two stacks. He says he wants native code and wouldn’t want any C# visible but doesn’t explain why. Fear of reverse engineering? UI code rarely contains anything secret. Also the single exe deployment, while convenient at times, is perhaps not worth the hassle in this scenario. Using a pa…

Agreed. I had the exact same question.

From the article: "The issue is that with bundling the .dll, it would still mean it being extracted somewhere and writing additional code for the P/Invoke to work, and C++/CLI gets compiled to .NET IL code, in other words, you can open the resulting app in dnSpy and see the C++ code translated to C# equivalent (which is not what I want, I want native code)."

I don't understand what the author is talking about. When they say the C++ code will be translated to the equivalent c#, that's not how interop works at all... the native C++ DLL is not somehow made magically more vulnerable to reverse engineering because you can p/invoke to it.

Re: Writing GUI apps for Windows is painful

#80

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.

> Can be compiled statically in a single .exe that is smaller than 40M.

That's... quite a high bar. Last I checked even a QML app was only like 20 MB. Why so big?

Post reply on HN