Community
    • Login

    A question about dark mode, plugins, and an owner-draw ComboBox

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    1 Posts 1 Posters 14 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • CoisesC
      Coises
      last edited by Coises

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

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors