Menu color with Windows 11?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
JnLlnd
Posts: 522
Joined: 29 Sep 2013, 21:29
Location: Montreal, Quebec, Canada
Contact:

Menu color with Windows 11?

09 Oct 2021, 14:36

Hi,

With Windows 10 and before, the Menu subcommand Color only allows to change the background color of the menu.
Changes the background color of the menu to ColorValue.
Menu, MenuName, Color, ColorValue [, Single]
The color of menu text cannot be changed. Since the text must stay black, dark color background must be avoided when changing menus background color. Also, the background color behind menu icons cannot be changed.

Since Win 10, more and more user enable the dark mode display. But this mode does not change the menus build with AHK. In this context, for users preferring dark display, these menus are, at least, unpleasant.

Can we hope that new options of Windows 11 (DllCall, PostMessage, etc.) could improve this situation?

Thanks,
Jean
:thumbup: Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
:P Now working on Quick Clipboard Editor
:ugeek: The Automator's Courses on AutoHotkey
ewerybody
Posts: 18
Joined: 04 Nov 2016, 09:16
Contact:

Re: Menu color with Windows 11?

22 Oct 2021, 13:02

Dang! Yea I was just looking into this! And thought: Explorer is doing it. That's probably easy to pull off with built-in means?
Cool there is already a color-Option! .. .well I mean this is not good :/
image.png
image.png (18.71 KiB) Viewed 1987 times
Ah! Seems its on the Wishlist already!
User avatar
JnLlnd
Posts: 522
Joined: 29 Sep 2013, 21:29
Location: Montreal, Quebec, Canada
Contact:

Re: Menu color with Windows 11?

22 Oct 2021, 13:17

ewerybody wrote:
22 Oct 2021, 13:02
Dang! Yea I was just looking into this! And thought: Explorer is doing it. That's probably easy to pull off with built-in means?
Not sure what you mean by "Explorer is doing it"?
:thumbup: Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
:P Now working on Quick Clipboard Editor
:ugeek: The Automator's Courses on AutoHotkey
ewerybody
Posts: 18
Joined: 04 Nov 2016, 09:16
Contact:

Re: Menu color with Windows 11?

22 Oct 2021, 13:25

I mean like
image.png
image.png (47.63 KiB) Viewed 1964 times
User avatar
kczx3
Posts: 1682
Joined: 06 Oct 2015, 21:39

Re: Menu color with Windows 11?

22 Oct 2021, 13:27

You're gonna have to draw the menu entirely yourself until there is a way to make AHK opt-in to the dark theme.

https://docs.microsoft.com/en-us/windows/win32/menurc/using-menus#creating-owner-drawn-menu-items
ewerybody
Posts: 18
Joined: 04 Nov 2016, 09:16
Contact:

Re: Menu color with Windows 11?

22 Oct 2021, 13:38

Thanks kczx3!

Did someone do this already?
I did some stuff with gdip but not to the extend to create a separate menu system :/
ewerybody
Posts: 18
Joined: 04 Nov 2016, 09:16
Contact:

Re: Menu color with Windows 11?

22 Oct 2021, 14:51

Whoow thats pretty sweet already! :D It works.
User avatar
JnLlnd
Posts: 522
Joined: 29 Sep 2013, 21:29
Location: Montreal, Quebec, Canada
Contact:

Re: Menu color with Windows 11?

22 Oct 2021, 17:51

@ewerybody: Thanks for the example. I get it.

@kczx3: Interesting. It seems to still work well even if it dates close to 10 years now. I'll continue testing it.

Thanks for your input.
:thumbup: Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
:P Now working on Quick Clipboard Editor
:ugeek: The Automator's Courses on AutoHotkey

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], cevvalkoala and 61 guests