Live data from Hacker News

Windows native app development is a mess

domenic.me

211–220 of 481 posts

Re: Windows native app development is a mess

#211

come back home Delphi 7, all is forgiven

It seems that peak native Windows dev tools were Delphi 7 and VB6. It's a tragedy that something at least as good as VB6 is not still developed and supported by Microsoft.

I think WinForms with C# or VB is as good, if perhaps not as fun or approachable.

Re: Windows native app development is a mess

#212

Let me chime in and say that plain Win32 API is a perfectly viable option if you are using C++ (or another "OO" language) and if you are willing to sink a couple of weeks into writing your own MFC-like wrapper. Clearly this is not an option for those who are just starting up with Windows GUI work, but with little experience it is really a matter of 2-3 weeks of ground work and then you have full control over all nuan…

The main thing that's hard going down this route is dark mode support. The Win32 USER and common controls just don't not support dark mode, but are actively hostile to it due to the amount of hardcoded light colors and backgrounds in the system. All of the system colors are light regardless of the dark/light system setting, highlights are hardcoded to light blue, disabled controls use a hardcoded color, half of the w…

First, dark mode is for people who set their screen brightness too high.

Second, win32 is designed with the ability to change all the default colors and you used to be able to do this by right clicking the desktop and selecting "properties". If dark mode doesn't follow this - just another symptom of Microsoft's siloing incompetence. The team that wrote dark mode may not have been aware that this feature existed because parts of the platform are so disconnected from other parts.

Re: Windows native app development is a mess

#213
post #98
post #75

Earlier quoted context omitted.

After bouncing around GUI toolkits (from win32 to SwiftUI) and web for 30 years I have simply run out of fucks. They all suck. Each in their own unique way. Apple aren't worth singling out - they are just their own special isolated variant of it.

Tcl/Tk is pretty good in terms of rapid development. Unfortunately it has stagnated quite a lot over the years. Gtk on the other hand is absolutely terrible and its developers don't help by completely rewriting things every few years and breaking all existing code in the process.

Tcl/Tk was also popular in certain niche products, like in RF test equipment.

Re: Windows native app development is a mess

#214

Let me chime in and say that plain Win32 API is a perfectly viable option if you are using C++ (or another "OO" language) and if you are willing to sink a couple of weeks into writing your own MFC-like wrapper. Clearly this is not an option for those who are just starting up with Windows GUI work, but with little experience it is really a matter of 2-3 weeks of ground work and then you have full control over all nuan…

Why not just use C++ Builder or Delphi?

Presumably because they don't support C++23

Re: Windows native app development is a mess

#215
post #105

Earlier quoted context omitted.

This is patently false. To add a button to your UI, you open your window’s nib file Xcode/Interface Builder, click the plus button on the toolbar, and add a button. Then you control-drag from the button to File’s Owner and choose the method that you want to invoke when the button is clicked. Done.

Programming with GUIs?

Why wouldn't you program a GUI with a GUI if one is available? Avoiding the use of WYSIWYG editors when making GUIs is like avoiding the use of musical instruments when writing songs.

Re: Windows native app development is a mess

#216
post #30

Earlier quoted context omitted.

Not sure about Unity, bot Godot is already used to build tools, like Pixelorama (pixel art graphics editor, a bit akin to Asesprite), RPG In A Box (game engine targeted for RPG games), Bitmapflow (tool to generate in-between animation frames), and probably more I don't know about. Well, if I remember correctly, the Godot editor is written in Godot.

Godot is written in C++ It may have some GDScript in there, but I don't think so. The sourcecode is available: https://github.com/godotengine/godot

The C++ code there (at least in the editor directory) initializes and configures godot ui components that the editor is made of

Re: Windows native app development is a mess

#217
post #105

Earlier quoted context omitted.

This is patently false. To add a button to your UI, you open your window’s nib file Xcode/Interface Builder, click the plus button on the toolbar, and add a button. Then you control-drag from the button to File’s Owner and choose the method that you want to invoke when the button is clicked. Done.

Programming with GUIs?

Yes, generations of Mac and Windows programmers have used GUIs to create their GUIs. Visual Basic, MFC + App Studio, .NET + WinForms, Interface Builder…

Re: Windows native app development is a mess

#218

Earlier quoted context omitted.

I went through that a few years ago and it actually went pretty smoothly. There were a few UINT_PTR or DWORD_PTR changes I had to get used to and a couple of string glitches (we mostly used the _T() macro for strings and already used the _t variants of string functions in the original code, so that helped). The biggest problems were DAO (database) and a few COM controls that were not available in x64.

Having to use macros for literal strings in your code is just incredibly stupid of Microsoft and/or C++.

How do Linux and Java do it, when you want to compile your program in both 16-bit char and 8-bit char mode? Oh that's right, you don't.

You can pick one or the otherfor Windows too, so don't ask me why it's done that way. It was originally so you could compile for both the new hotness Unicode, and the old compatible ASCII.

Re: Windows native app development is a mess

#219
post #16

Lazarus is crazy good, as is Delphi, if you can afford it. wxWidgets is also nice, without the licensing weirdness that is Qt.

wxWidgets is just a wrapper around existing UI libraries; win32 on Windows, and Gtk/Qt on *nix.

Yes, as is the VCL that Delphi ships, along with the Lazarus component library which bases on Qt or GTK on Linux, and Win32 on Windows. It's the same sort of layer.

Re: Windows native app development is a mess

#220
post #212

Earlier quoted context omitted.

The main thing that's hard going down this route is dark mode support. The Win32 USER and common controls just don't not support dark mode, but are actively hostile to it due to the amount of hardcoded light colors and backgrounds in the system. All of the system colors are light regardless of the dark/light system setting, highlights are hardcoded to light blue, disabled controls use a hardcoded color, half of the w…

First, dark mode is for people who set their screen brightness too high. Second, win32 is designed with the ability to change all the default colors and you used to be able to do this by right clicking the desktop and selecting "properties". If dark mode doesn't follow this - just another symptom of Microsoft's siloing incompetence. The team that wrote dark mode may not have been aware that this feature existed becau…

Dark mode for apps is a setting in the OS and a general expectation now, it's suboptimal to ship a new UI that doesn't support it. And, again, Win32 message boxes in your program will switch to dark mode whether you want them to or not.

Win32 controls ignoring system colors goes much farther back than dark mode being introduced in Windows 10. The theming engine that broke a lot of that functionality was introduced in Windows XP. Beyond that, there were always a few hardcoded colors like disabled gray text going back to Windows 95.

Dark mode ignoring Win32 system colors is not incompetence. It was _intentional_. Dark mode was introduced by the UWP side, which intentionally did not extend it to Win32. To this day, there is not even a Win32 API for desktop apps to query whether dark mode is even enabled. The official recommendation is to compute the luminance of the UWP foreground color setting:

https://learn.microsoft.com/en-us/windows/apps/desktop/moder...

Post reply on HN