13.1 problem with Scenic and White Themes? |
Post Reply |
Author | |
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
Posted: 25 June 2009 at 11:10am |
Hi
Anybody know why my scenic and white themes aren't working properly. What changes need to be made from 13.0 to get new themes working :(
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
robin_l
Senior Member Joined: 15 October 2006 Status: Offline Points: 117 |
Post Options
Thanks(0)
|
Put the following in your .RC2 file
#include "Styles\Office2007Scenic\Office2007Scenic.rc"
#include "Styles\Office2007White\Office2007White.rc" Then incorporate code similar to that in the ribbon sample to swap themes.
|
|
Product: Xtreme ToolkitPro 2009 (13.4.1)
Platform: Windows 7 Ultimate(64bit) Language: Visual Studio 2010 (C++) |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Hi
We have this already, and the themes are fine except for the ribbon tab text which is white for some reason
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
robin_l
Senior Member Joined: 15 October 2006 Status: Offline Points: 117 |
Post Options
Thanks(0)
|
Well I find I fail to get some window elements updated correctly if I copy the ribbonsample code exactly and certainly can't get by without sending a WM_NCPAINT message... dunno whether you have something similar. For what it is worth, the full code I use is copied below:
void CGFMainWnd::OnOptionsStyle(UINT nStyle)
{
HMODULE hModule = AfxGetInstanceHandle(); LPCTSTR lpszIniFile = 0;
switch (nStyle) { default: case ID_OPTIONS_STYLEBLUE: lpszIniFile = _T("OFFICE2007BLUE.INI"); break; case ID_OPTIONS_STYLEBLACK: lpszIniFile = _T("OFFICE2007BLACK.INI"); break; case ID_OPTIONS_STYLEAQUA: lpszIniFile = _T("OFFICE2007AQUA.INI"); break; case ID_OPTIONS_STYLESILVER: lpszIniFile = _T("OFFICE2007SILVER.INI"); break; case ID_OPTIONS_STYLESCENIC: lpszIniFile = _T("OFFICE2007SCENIC.INI"); break; case ID_OPTIONS_STYLEWHITE: lpszIniFile = _T("OFFICE2007WHITE.INI"); break; } ((CXTPOffice2007Theme*)GetCommandBars()->GetPaintManager())->SetImageHandle(hModule, lpszIniFile);
GetCommandBars()->GetImageManager()->RefreshAll();
GetCommandBars()->RedrawCommandBars(); SendMessage(WM_NCPAINT); m_paneManager.GetPaintManager()->RefreshMetrics();
m_MTIClientWnd.GetPaintManager()->RefreshMetrics(); CXTPPaintManager::SetTheme(xtpThemeRibbon); RedrawWindow(0, 0, RDW_ALLCHILDREN|RDW_INVALIDATE); m_nRibbonStyle = nStyle;
} |
|
Product: Xtreme ToolkitPro 2009 (13.4.1)
Platform: Windows 7 Ultimate(64bit) Language: Visual Studio 2010 (C++) |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Thanks, but till same issue :( very very strange
The text on the ribbon tabs is actually transparent lol so when you move the window you can see the background through the text???
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
I have created a video to show the problem on Vista, please click Large Size to see the Ribbon tabs properly (and you may need to make full screen. Any ideas much appreciated.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
robin_l
Senior Member Joined: 15 October 2006 Status: Offline Points: 117 |
Post Options
Thanks(0)
|
Bizarre.... I presume the ribbonsample runs OK on your system, AFTER building it locally....
|
|
Product: Xtreme ToolkitPro 2009 (13.4.1)
Platform: Windows 7 Ultimate(64bit) Language: Visual Studio 2010 (C++) |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Cool software Terry! :D
|
|
PokerMemento - http://www.pokermemento.com/
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Thats the strange thing, the sample does work lol :( but this could be a memory leak or problem in XTP as we use GDIPlus etc. but we have no leaks as checked all code.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Thanks :)
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
We have found the reason white theme is not working on our application, but not sure how to fix:
Ah for some reason your sample is calling: AFX_INLINE BOOL IsCompositeRect(CXTPCommandBar* pRibbonBar, const CRect& rc) Which is found in the XTPRibbonPaintManager.cpp class however our application for some reason is calling: AFX_INLINE BOOL IsCompositeRect(CXTPCommandBar* pRibbonBar, const CRect& rc) from XTPRibbonTheme.cpp Any ideas why this would happen lol |
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
markr
Senior Member Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
|
We're having this problem with the white theme as well (tab text is wrong color).
Main difference between our app and sample is that we link statically. Our app .rc2 contains all the required resources, and all other themes are working perfectly. |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
To fix this issue change
AFX_INLINE BOOL IsCompositeRect(CXTPCommandBar* pRibbonBar, const CRect& rc)
to
IsCompositeRect2
in XTPRibbonPaintManager.cpp however I do believe this is being fixed for next release of XTP, also you may want to ask Oleg for updates white theme as the contextual tabs dont show correctly otherwise.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
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 |