![]() |
Update ALL 2007-themed controls |
Post Reply
|
| Author | |
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
Topic: Update ALL 2007-themed controlsPosted: 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/
|
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
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/
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
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/
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 February 2009 at 12:00pm |
|
Hi, You have to change controls to CXTP version then.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
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/
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
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/
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 March 2009 at 1:53am |
|
Call
m_paneReport.RedrawControl(); instedad Invalidate.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 March 2009 at 7:32am |
|
Works. Thanks! :)
|
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |