Hi, @BorisM
Create a MFC class that inherits Class CMFCVisualManagerOffice2007 and rewrite OnDrawRibbonCaption.
Also, you need to redraw the title text and min/max/close buttons.
virtual void OnDrawRibbonCaption(
CDC* pDC,
CMFCRibbonBar* pBar,
CRect rectCaption,
CRect rectText) override
{
CWnd* pWnd = pBar->GetParent();
ASSERT_VALID(pWnd);
CDrawingManager dm(*pDC);
COLORREF clrBackground = RGB(0, 120, 215);
dm.DrawRect(rectCaption, clrBackground, clrBackground);
//redraw text and max,min button
}
BOOL CMFCApplicationApp::InitInstance()
{
......
CWinAppEx::InitInstance();
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMyVisualStyleClass));
Best regards,
Minxin Yu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.