logoalt Hacker News

radarroarkyesterday at 11:34 PM4 repliesview on HN

I want to go back to making desktop programs the way we used to before they turned into web apps that bundled chrome. I know I should just use Qt but I have some experience already with win32, and all the programs I have fond memories of are written with it (foobar2000, winamp, Everything, etc).


Replies

swinglockyesterday at 11:41 PM

Win32 and Wine being a lightweight alternative to HTML and Electrum is a fun idea.

show 1 reply
badsectoraculatoday at 4:44 AM

Someone else mentioned Lazarus, though that is Object/Free Pascal, not C/C++. The API is based on VCL for Delphi which was designed for the Windows API and even though Lazarus is cross-platform and can use multiple backends (actually i've been playing with writing a FLTK backend[0], though it is in primitive stages and FLTK doesn't really like exposing much of its guts), the API has some windows-isms (e.g. colors are 4 bytes where one byte is used a special marker to indicate system colors, just like in Windows) and the backends even have to implement a small subset of the Windows API to work :-P.

An alternative in C++ would be wxWidgets which has some (light) MFC inspirations, again feeling somewhat Windowsy though not full-on MFC/Win32 since from the beginning it had to work with X Windows / Motif in addition to Win32 (and AFAIK, the Motif backend still works).

Another alternative, even more lightweight would be the aforementioned FLTK. FLTK is also designed to be statically linked with your program (though it can be linked dynamically too if you want) so it only relies on common system libraries (as an example the screenshot in [0] relies only on the C library, the C++ library -because it is needed by FLTK and it is possible to also statically link to that too- and common X11 libraries like libX11, libXft, etc that existed on any Linux desktop system for decades now -- FLTK can also support Wayland, though i haven't tested that).

[0] https://i.imgur.com/W6XbLkr.png

purerandomnesstoday at 2:31 AM

You might like https://www.lazarus-ide.org/

wizzwizz4today at 1:11 AM

Have you considered Tk? Visually, it's quite like Win32, but it's fully cross-platform and (as of Tcl 9.0) has basic screen-reader support – so no mucking around with OLEACC shims or IAccessible2, as you'd need for COMCTL32. And it supports virtually everything Win32 does, with the ability to drop down to platform-specific sorcery (i.e., Win32) if the need arises.