Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Update ALL 2007-themed controls
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Update ALL 2007-themed controls

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Update ALL 2007-themed controls
    Posted: 09 February 2009 at 10:03am

XTP 12.1.1.

This has been bugging me for a long time.
 
Q: After switching Office 2007-theme, exactly what do you need to do to make all controls get the new colors? Please provide some pseudo code :)
 
I remember I called some "Redraw all children" function, but that didn't work for certain panes etc. Then I removed all code, and it worked... until I switched to Vista and upgrade from XTP 11.2.2...
PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2009 at 6:27am

I know one of the samples does this, but it's not a complete solution. Any ideas on how to do this optimally?

PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2009 at 2:56am
Hi,
Automatically change theme you can do only with SkinFramework. Without you have manually replace classes to CXTP versions and change themes.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2009 at 9:07am
I'm talking about the ribbon-colors here. Not using the SkinFramework for that...
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2009 at 12:00pm

Hi,

You have to change controls to CXTP version then.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2009 at 4:39pm
You're not following me here. All my controls are CXTP. I have an SDI-ribbon application with all four Office 2007-colors (like in your sample). The problem is that my pane managers and its panes (CXTPReportControl etc) are not updated when I change the color theme (Blue, Aqua, Black or Silver).
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2009 at 3:27am
Hi,
 
Most easy way to update colors is to set 2007 theme again for each control.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 11 March 2009 at 7:14pm
I got it working for all controls, except CXTPReportControl. I have to click on them to get the updated look! Why?
 
void CMainFrame::OnOptionsStyle(UINT ID)
{
    ...
    XTPOffice2007Images()->SetHandle(hModule, strIniFile));
 
    GetCommandBars()->GetPaintManager()->RefreshMetrics();
    GetCommandBars()->RecalcFrameLayout();
   
    m_paneManager.GetPaintManager()->RefreshMetrics();
 
    // Tab control is correctly updated!
    m_wndTab.GetPaintManager()->SetColor(xtpTabColorOffice2007);
    m_wndTab.Invalidate();
 
    // Report control is not updated until clicked!
     if (m_paneReport.GetSafeHwnd())
    {
        m_paneReport.GetPaintManager()->SetColumnStyle(xtpReportColumnOffice2007);
        m_paneReport.Invalidate();

    }
    m_paneManager.RedrawPanes();
    SendMessage(WM_NCPAINT);
   
    RedrawWindow(0, 0, RDW_ALLCHILDREN | RDW_INVALIDATE);
}
 
 
XTP 13. Vista Pro.
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 March 2009 at 1:53am
Call
m_paneReport.RedrawControl(); instedad Invalidate.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 13 March 2009 at 7:32am
Works. Thanks! :)
PokerMemento - http://www.pokermemento.com/
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.156 seconds.