Print Page | Close Window

StatusBar Theme?

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=7361
Printed Date: 13 November 2025 at 2:02am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: StatusBar Theme?
Posted By: Ashok
Subject: StatusBar Theme?
Date 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.



Replies:
Posted By: Oleg
Date 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


Posted By: Ashok
Date Posted: 13 June 2007 at 1:33am
Great!. It works. Many Thanks



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