Cannot set background color for status bar buttons |
Post Reply |
Author | |
KarthickG
Newbie Joined: 17 February 2019 Location: Belgium Status: Offline Points: 4 |
Post Options
Thanks(0)
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |