Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - 13.1 problem with Scenic and White Themes?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

13.1 problem with Scenic and White Themes?

 Post Reply Post Reply
Author
Message
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Topic: 13.1 problem with Scenic and White Themes?
    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
Back to Top
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post 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++)
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post 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++)
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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.

 
Any ideas much appreciated.
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post 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++)
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: 26 June 2009 at 2:44am
Cool software Terry! :D
PokerMemento - http://www.pokermemento.com/
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 442
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post 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
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.188 seconds.