Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - [SOLVED] XTPRibbonControlSystemButton Theme Change
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] XTPRibbonControlSystemButton Theme Change

 Post Reply Post Reply
Author
Message
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 645
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] XTPRibbonControlSystemButton Theme Change
    Posted: 19 August 2016 at 5:32am
I can't find a way to update the XTPRibbonControlSystemButton theme.

The XTPRibbonControlSystemButton is the first Ribbon button, typically called "File", with the fancy color following the Office themes. E.g. when changing the Office2013 theme from Word to PowerPoint, the color of the XTPRibbonControlSystemButton is not changed. The only way to fix this is to delete and recreate the entire Ribbon. There must be an easier way?

-cpede
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2016 at 3:45pm
Hello cpede,

I can't reproduce this behavior. Even with v16.4 when backstage doesn't change color, but system button change it.
Please explore RibbonSample for theme changing. It works as expected.

Regards,
 Oleksandr Lebed
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 645
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2016 at 5:48pm
When I e.g. select Office2013 PowerPoint Theme, and switches between Dark and Light Gray sub-theme the sample crashes :-(

But it seems that the sample also recreates the backstage (testing and reusing the individual backstage pages). What exactly generates the repaint of the system button?
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2016 at 12:17pm
Originally posted by cpede cpede wrote:

When I e.g. select Office2013 PowerPoint Theme, and switches between Dark and Light Gray sub-theme the sample crashes :-(

Are you sure that use v17.2 of library ?  I fixed this issue on 1st of February 2016 :-)
in RibbonSample
in CMainFrame::OnOptionsStyleOffice2013LtGray() and CMainFrame::OnOptionsStyleOffice2013DkGray()
replace  SetTheme() with SetStyle().

Originally posted by cpede cpede wrote:

But it seems that the sample also recreates the backstage (testing and reusing the individual backstage pages). What exactly generates the repaint of the system button?

SystemButton is drawn with other ribbon controls in cycle in CXTPRibbonBar::DrawCommandBar()

> ToolkitPro1720UD.dll!CXTPRibbonMarkupTheme::DrawRibbonFrameSystemButton(CDC * pDC, CXTPRibbonControlSystemButton * pControl, CRect rc) Line 842 C++
  ToolkitPro1720UD.dll!CXTPRibbonControlSystemButton::Draw(CDC * pDC) Line 101 C++
  ToolkitPro1720UD.dll!CXTPRibbonBar::DrawCommandBar(CDC * pDC, CRect rcClipBox) Line 1631 C++
  ToolkitPro1720UD.dll!CXTPCommandBarAnimation::OnPaint(CPaintDC & paintDC) Line 348 C++
  ToolkitPro1720UD.dll!CXTPCommandBar::OnPaint() Line 1557 C++

Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 645
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 22 August 2016 at 1:55am
Super, thanks I got it to work :-)

-cpede
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.