Print Page | Close Window

How to access CXTPTabPaintManager?

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=4059
Printed Date: 10 November 2025 at 9:53am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to access CXTPTabPaintManager?
Posted By: klisa
Subject: How to access CXTPTabPaintManager?
Date Posted: 26 April 2006 at 7:02am

Hello,

Does anyone know how to access CXTPTabPaintManager within an SDI application?

Also, is there only one instance of CXTPTabPaintManager per application, or each CXTPDockingPaneTabbedContainer has its own?

Here is what I I tried in absence of a better idea (I know, it's a really stupid thing to do but I was desperate):
 - walking through all panes
 - checking if their containers are CXTPDockingPaneTabbedContainer(s)
 - for each CXTPDockingPaneTabbedContainer found, access its CXTPTabPaintManager through GetPaintManager()

This is how the code looks like:

  CXTPDockingPaneInfoList& lst = _paneManager.GetPaneList(); // CXTPDockingPaneManager _paneManager;
  POSITION pos = lst.GetHeadPosition();
  while (pos)
  {
    CXTPDockingPane* pane = (CXTPDockingPane*) lst.GetNext(pos);
    CXTPDockingPaneBase* container = pane->GetContainer();
    if (!container || container->GetType() != xtpPaneTypeTabbedContainer)
      continue;
    CXTPDockingPaneTabbedContainer* tabs = static_cast<CXTPDockingPaneTabbedContainer*>(container );
    CXTPTabPaintManager* tabPaintManager = tabs->GetPaintManager();
    tabPaintManager->GetColorSet()->m_clrHeaderFace.clrDar k = RGB(255,0,0);
    tabPaintManager->GetColorSet()->m_clrHeaderFace.clrLig ht = RGB(0,0,255);
  }

Unfortunately, CXTPDockingPaneTabbedContainer::GetPaintManager() is a protected method so the above code fails to compile.

I'm sure there is a simple way to do the same thing.

Thanks in advance for any help!

 




Replies:
Posted By: klisa
Date Posted: 26 April 2006 at 8:15am

This is really embarrassing... :)

CXTPTabPaintManager* tabPaintManager = _paneManager.GetPaintManager()->GetTabPaintManager();




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