Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Black ribbon from startup not possible?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Black ribbon from startup not possible?

 Post Reply Post Reply
Author
Message
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 Topic: Black ribbon from startup not possible?
    Posted: 20 July 2008 at 5:28am
XTP 12.0.1, XP SP2, SDI-application with panes.
 
In CMainFrame constructor:
 
XTPSkinManager()->GetResourceFile()->SetModuleHandle(hModule);
XTPSkinManager()->LoadSkin(NULL, _T("NORMALBLUE.INI"));
 
XTPOffice2007Images()->SetHandle(hModule, _T("OFFICE2007BLACK.INI"));
 
Then when I create multiple panes in CMainFrame::OnCreate, some of them are initially seen as if "OFFICE2007BLUE" was set! After a second or so, they turn black. Why this delay?!
 
What is going on? I explicitly set black ribbon-style, way before the panes are created!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2008 at 4:15am
Hi,
 
What theme you have for Panes ? Try to set theme before you create panes.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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: 21 July 2008 at 6:15pm
// Set Office 2007 Theme
CXTPPaintManager::SetTheme(xtpThemeRibbon);
-- InitCommandBars --
-- Create ribbon --
-- Create child windows (panes) --
 
m_paneManager.InstallDockingPanes(this);
m_paneManager.EnableKeyboardNavigate();
m_paneManager.GetPaintManager()->m_nSplitterSize = 2;
m_paneManager.HideClient(TRUE);
 
Then I create its panes! I don't specify a theme (haven't I already set it above?).
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2008 at 1:57am
Hi,
Above you set theme for CommandBars. you have set theme for DockingPane too.
 
Find m_paneManager.SetTheme line and move it after m_paneManager.InstallDockingPanes
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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: 22 July 2008 at 4:35pm
That solved it for all but one pane. I also had to move "GetPaintManager()->SetColumnStyle(xtpReportColumnOffice2007);" from the constructor of my report controls, to PreSubclassWindow!
 
Thanks Oleg!
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.156 seconds.