Is it possible to change the backcolor of a MainMenu
I have tried using the handle property of the inherited Menu class using it as a parameter for the win32 api function SetMenuInfo, but it didn't work
Any help
Thx in advance, Marc
DotNetJunkies User - 03 Sep 2004 10:01 GMT
You can change it with this code. Do not forget to add MIM_BACKGROUND to fMask. It works.
HBRUSH hBrush;
MENUINFO mi = { 0 };
//Office XP menu bar background color
hBrush = CreateSolidBrush(RGB(195,218,249));
mi.cbSize = sizeof(MENUINFO);
mi.fMask = MIM_BACKGROUND|MIM_APPLYTOSUBMENUS;
mi.hbrBack = hBrush;
SetMenuInfo(hMenu, &mi);
Atila
---