Click here to Skip to main content
15,907,395 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to change backgroung color of ToolBar and MenuBar of my application in Windows 7. I have this one [^]. But I want to recieve color scheme like here [^]. Also I'd like to know - this problem is connected with Visual Styles, and can be solved with some functions or I should write my own classes. If you have any example code, I would glad to see it!

What I have tried:

I've tried to change menu bar with this code

CBrush* NewBrush;
NewBrush = new CBrush;
NewBrush->CreateSolidBrush(RGB(139,137,137));

MENUINFO MenuInfo = {0};
MenuInfo.cbSize = sizeof(MenuInfo);
MenuInfo.hbrBack = *NewBrush; // Brush you want to draw
MenuInfo.fMask = MIM_BACKGROUND;
MenuInfo.dwStyle = MNS_AUTODISMISS;
CMenu* pMenu = this->GetMenu();
if(IsMenu(pMenu->m_hMenu))
{
SetMenuInfo(pMenu->m_hMenu, &MenuInfo);
}

I've tried to use:
SetWindowTheme()
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900