A question about dark mode, plugins, and an owner-draw ComboBox
-
I’m working on a plugin and I have a couple questions about dark mode. I’m hoping someone who reads this will know the answers. I have looked at the code, but I don’t really follow everything it’s doing.
My Settings dialog uses a ComboBox with style:
CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
I’m sending an NPPM_DARKMODESUBCLASSANDTHEME message with wParam = NppDarkMode::dmfInit at the end of my WM_INITDIALOG process in the hopes of not antagonizing users who have dark mode enabled.
The ComboBox is fine in light mode but it is messed up in dark mode.
-
Am I correct in thinking that the dark mode subclass process does not support owner-draw combo boxes?
-
Is there a way to exempt just that one control from the processing and try to figure out myself how to set the right colors, or do I need to drop the NPPM_DARKMODESUBCLASSANDTHEME message and either stay in light mode or handle all of the dark mode processing in my code? (Staying in light mode is an option; it’s not like users have the Settings dialog open all the time. The main dialog, fortunately, doesn’t seem to have any controls the dark mode handler doesn’t like. Yet. But I may need to go to owner-draw buttons at some point, and perhaps they will have the same problem.)
-