Print Page | Close Window

13.1 problem with Scenic and White Themes?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=14616
Printed Date: 18 June 2024 at 7:54am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: 13.1 problem with Scenic and White Themes?
Posted By: terrym
Subject: 13.1 problem with Scenic and White Themes?
Date 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



Replies:
Posted By: robin_l
Date Posted: 25 June 2009 at 3:18pm
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++)


Posted By: terrym
Date Posted: 25 June 2009 at 3:24pm
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


Posted By: robin_l
Date Posted: 25 June 2009 at 3:35pm
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++)


Posted By: terrym
Date Posted: 25 June 2009 at 4:02pm
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


Posted By: terrym
Date Posted: 25 June 2009 at 4:42pm

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.

http://www.screencast.com/users/My-Software/folders/Jing/media/a01a1b8e-2b6a-4c12-a322-37d1953c2525 - http://www.screencast.com/users/My-Software/folders/Jing/media/a01a1b8e-2b6a-4c12-a322-37d1953c2525
 
Any ideas much appreciated.


-------------
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey


Posted By: robin_l
Date Posted: 25 June 2009 at 4:48pm
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++)


Posted By: znakeeye
Date Posted: 26 June 2009 at 2:44am
Cool software Terry! :D

-------------
PokerMemento - http://www.pokermemento.com/


Posted By: terrym
Date Posted: 26 June 2009 at 4:44am
Originally posted by robin_l robin_l wrote:

Bizarre.... I presume the ribbonsample runs OK on your system, AFTER building it locally....
 
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


Posted By: terrym
Date Posted: 26 June 2009 at 4:50am
Originally posted by znakeeye znakeeye wrote:

Cool software Terry! :D
 
Thanks :)
 


-------------
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey


Posted By: terrym
Date Posted: 29 June 2009 at 11:24am
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


Posted By: markr
Date Posted: 12 August 2009 at 9:55am
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.


Posted By: terrym
Date Posted: 12 August 2009 at 10:03am
Originally posted by markr markr wrote:

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.
 
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net