Print Page | Close Window

Cannot set background color for status bar buttons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=23821
Printed Date: 11 December 2024 at 6:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Cannot set background color for status bar buttons
Posted By: KarthickG
Subject: Cannot set background color for status bar buttons
Date Posted: 21 February 2019 at 3:57am

Hello,

We were using Xtremetoolkit 16.4 with OfficeTheme 2007 without any issue.

We recently upgraded to Xtremetoolkit 18.6 and also integrated OfficeTheme2013. Now we see our status bar buttons do not set the user provided custom background color. It uses the default Office2016 theme color.

To fix it I modified code as CXTPStatusBarThemeOffice2013::DrawStatusBarButtonFace below

void CXTPStatusBarThemeOffice2013::DrawStatusBarButtonFace(CDC *pDC, CRect rcItem, CXTPStatusBarPane *pPane)

{

if (pPane->IsPressed())     pDC->FillSolidRect(rcItem, m_clrButtonBackPushed);

else if (pPane->IsHighlighted()) pDC->FillSolidRect(rcItem, m_clrButtonBackHighlight);

else if (pPane->IsChecked())     pDC->FillSolidRect(rcItem, m_clrButtonBackChecked);


// Hack: Commenting the following line. This overrides the user set custom background color with the default.

//else                             pDC->FillSolidRect(rcItem, m_clrButtonBack);

}

Could you please let us know, if you would consider this as a bug and fix in your libraries? A same or a different fix..

To reproduce the problem, please replace Samples\CommandBars\StatusBar\MainFrm.cpp file with the attached file.

When this sample app. Starts, you can notice 100% in the status bar is with Red background. Change Theme to Office 2013, this button is not red anymore. With the above fix it will be Red.


Thanks & regards,

Karthick


uploads/9333/Sample.zip" rel="nofollow - uploads/9333/Sample.zip




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