Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - StatusBar Theme?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

StatusBar Theme?

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


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Topic: StatusBar Theme?
    Posted: 12 June 2007 at 4:06am

Hi,

   I have a problem with CXTPStatusBar. Please see the code...
 
The following code is in te InitInstance()
 

CXTPStatusBar m_wndStatusBar;

if (!m_wndStatusBar.Create(this) ||

!m_wndStatusBar.SetIndicators(indicators,sizeof(indicators)/sizeofUINT)))

{

TRACE0("Failed to create status bar\n");

return -1; // fail to create

}

COLORREF clr = XTPColorManager()->grcDockBar.clrDark;

m_wndStatusBar.GetStatusBarCtrl().SetBkColor(clr);

It is working fine ie., it brings the commandbars theme into the statusbar. But when I am implementing the manifest for the common controls, the statusbar theme become changed to classic theme style. Any Solutions.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 13 June 2007 at 12:35am
Hi,
 
I guess you use Office 2003 theme?
 
You can create custom theme and fill status bar manually:
 

class CAshokTheme : public CXTPOffice2003Theme
{
 void FillStatusBar(CDC* pDC, CXTPStatusBar* pBar)
 {
  pDC->FillSolidRect(CXTPClientRect(pBar), XTPColorManager()->grcDockBar.clrDark);
//   XTPDrawHelpers()->GradientFill(pDC, CXTPClientRect(pBar), XTPColorManager()->grcDockBar, FALSE); // or gradient.
 }
};
 
to apply call
 
XTPPaintManager()->SetCustomTheme(new CAshokTheme());
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2007 at 1:33am
Great!. It works. Many Thanks
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.063 seconds.