Hacker News new | ask | show | jobs
by MikeTV 717 days ago
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.
3 comments

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

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...

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.

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.