News for hackers. Stuff that matters.
Re:Writing GUI apps for Windows is painful by MikeTV on Sunday June 30, 2024 @05:50PM (#40840680)
Do you happen to have links to any good documentation/articles on this topic? I'm working on what amounts to a dark theme for Win32 controls and largely making it up as I go along, relying on tidbits and off-hand mentions from defunct blogs.
Re:Writing GUI apps for Windows is painful by ack_complete on Sunday June 30, 2024 @07:53PM (#40841423)
Afraid not, had to piece together a lot of it myself. There are lots of examples available for various components of varying quality -- you'll find some code examples that don't work well with high DPI or all of the sub-modes of a control.

Some controls like buttons, list boxes, list views are reasonably well behaved, especially when theming is turned off. Combo boxes and toolbars are more temperamental. Check boxes, scroll bars, menus, and message boxes require a lot of custom painting work.

Re:Writing GUI apps for Windows is painful by MikeTV on Sunday June 30, 2024 @08:09PM (#40841484)
Would you mind sending me an email (address in profile)? I'd love to pick your brain about some of the trickier ones I'm running into.
Re:Writing GUI apps for Windows is painful by adzm on Monday July 01, 2024 @04:38AM (#40843762)
Check out my win32 dark mode menu bar in case it comes in handy.

Also I know far far too much about the internals of classic win32 rendering if you have questions

https://github.com/adzm/win32-custom-menubar-aero-theme

Re:Writing GUI apps for Windows is painful by davee on Monday July 01, 2024 @02:01PM (#40848442)
I have a reasonably complete implementation of dark mode in my open source application, Explorer++. It uses the standard Win32 controls and applies a variety of strategies to get something that looks more-or-less cohesive when dark mode is enabled. ThemeManager.cpp[0] contains the bulk of the functionality. It could be useful as a reference for how you might create a dark version of a standard Win32 control.

[0] https://github.com/derceg/explorerplusplus/blob/4bad3ab95d87...