Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Background of CXTPTabCtrl modification needed ...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Background of CXTPTabCtrl modification needed ...

 Post Reply Post Reply
Author
Message
kiroecke View Drop Down
Groupie
Groupie


Joined: 02 July 2008
Location: Germany
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote kiroecke Quote  Post ReplyReply Direct Link To This Post Topic: Background of CXTPTabCtrl modification needed ...
    Posted: 14 January 2026 at 5:30am
Hello,

the background behind the tab-headers in my CXTPTabCtrl remains grey whatever I try. My last check was 

 
auto* pPaintManager = m_pTabCtrl.GetPaintManager(); // exact name may vary by control type
if (pPaintManager != nullptr)
{
   auto* pColorSet = pPaintManager->GetColorSet();
   if (pColorSet != nullptr)
   {
          pColorSet->m_clrHeaderFace.clrLight.SetStandardValue(RGB(255, 255, 255));
          pColorSet->m_clrHeaderFace.clrDark.SetStandardValue(RGB(255, 255, 255));
          pColorSet->RefreshMetrics();
   }
}


The code was stepped through in the debugging, but the area remained grey.
Any suggestions are welcome! 
Best, Kai

Header background CXTPTabCtrl
Back to Top
xsensordev View Drop Down
Groupie
Groupie


Joined: 19 August 2021
Location: Canada
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote xsensordev Quote  Post ReplyReply Direct Link To This Post Posted: Yesterday at 4:08pm
I'm going to assume a somewhat recent version of the Toolkit, and I'm guessing you're using the base theme for that control.

Try setting a breakpoint in CXTPTabBaseTheme::FillHeader or any of the other FillHeader functions to see what's happening.

By the way, that strip you want to fill is not distinguished from the tabs.  You'd have to modify the FillHeader function (for whichever theme is being applied) to perform your own painting of the strip.
Back to Top
kiroecke View Drop Down
Groupie
Groupie


Joined: 02 July 2008
Location: Germany
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote kiroecke Quote  Post ReplyReply Direct Link To This Post Posted: 12 hours 52 minutes ago at 3:40am
Hello, 

thank you so much for your help. Anyways, the mentioned ::FillHeader() function is protected and can't be invoked by user code. 

And, yes, I'm using v24.3.0 of Toolkit Pro.

Any further help is highly appreciated!
Best regards,
K.


Back to Top
xsensordev View Drop Down
Groupie
Groupie


Joined: 19 August 2021
Location: Canada
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote xsensordev Quote  Post ReplyReply Direct Link To This Post Posted: 3 hours 54 minutes ago at 12:38pm
My solution to Toolkit protected code was to realize I didn't need anyone's permission to modify that code directly.

I modify their code as I need and rebuild the DLL or static lib. I track my changes so that I can reapply them as new Toolkit versions come out.

For example, 
CXTPTabBase::SetTheme
 does not have support for xtpControlThemeOffice2016. So I rolled my own 
class _XTP_EXT_CLASS CXTPTabBaseThemeOffice2016 : public CXTPTabBaseTheme
 and put in right in XTPTabBaseTheme and then updated the Toolkit to support that tab theme.



Back to Top
xsensordev View Drop Down
Groupie
Groupie


Joined: 19 August 2021
Location: Canada
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote xsensordev Quote  Post ReplyReply Direct Link To This Post Posted: 3 hours 51 minutes ago at 12:41pm
Here's a visual of that Office2016 tab.


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.078 seconds.