![]() |
Update ALL 2007-themed controls |
Post Reply ![]() |
Author | |
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() 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/
|
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
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 ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() ![]() |
I'm talking about the ribbon-colors here. Not using the SkinFramework for that...
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() ![]() |
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 ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() ![]() |
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 ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Call
m_paneReport.RedrawControl(); instedad Invalidate.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
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 |