Reputation: 1332
I tried SetMenuInfo
with MIM_BACKGROUND
, but it doesn't work. I found it is because the Visual Style is enabled. But I don't want to disable the Visual Style by SetWindowTheme(hwndMain, L"", L"")
because it will change the appearance of the title bar and border...etc.
Is there any way to change, and only change the background color of the menu bar, without disable Visual Style of the main window. By "only change", I also mean that I don't have to draw the menu items myself, like I can use custom draw for change only the background color of toolbar, tab...etc. (But I can find custom draw for menu bar!).
Upvotes: 2
Views: 3550
Reputation: 4146
With themes there is no official way to change the color. However you can take advantage of some undocumented window messages to implement the custom drawing yourself. https://github.com/adzm/win32-custom-menubar-aero-theme
Upvotes: 1
Reputation: 19
You just set MainMenu's OwnerDraw
Property to true, and Menu is automatically close Menu's theme, but don't close Window's theme!
Upvotes: 1