0

How to change the looks or MFCMenuButton? We need some dark color scheme, so styles is set to CMFCVisualManagerOffice2007::Office2007_ObsidianBlack. Visual manager is set as follows:

class CustomVisualManager : public CMFCVisualManagerOffice2007  {
public: 
     DECLARE_DYNCREATE(CustomVisualManager);

     CustomVisualManager()
     {
        SetStyle(Office2007_ObsidianBlack);
     } 
};

CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(Hydra::CustomVisualManager));

The looks of some UI has changed but MFCMenuButton style remains light gray.

TylerH
  • 20,799
  • 66
  • 75
  • 101
ChatCloud
  • 1,152
  • 2
  • 8
  • 22
  • I guess that you have to override some "ondraw" method of that CMFCVisualManagerOffice2007 to do what you want, but I cannot find the CMFCButton one – Robson May 05 '15 at 14:18
  • 1
    I've also seen that there is a CMFCButton::EnableWindowsTheming that you can use, but anyway the visualmanager will not change the button's color to black it will still stay gray – Robson May 05 '15 at 14:19
  • it looks like CMFCBaseVisualManager::DrawPushButton(...) is reponsible for drawing the background with a specific theme (*m_pfDrawThemeBackground)(m_hThemeButton, pDC->GetSafeHdc(), BP_PUSHBUTTON, nState, &rect, 0); – ChatCloud May 05 '15 at 14:26
  • Try SetFaceColor — https://msdn.microsoft.com/en-us/library/bb983413.aspx – sergiol Jul 11 '15 at 21:18

0 Answers0