Print Page | Close Window

ID of floating pane

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


Topic: ID of floating pane
Posted By: Magnetic core
Subject: ID of floating pane
Date Posted: 03 January 2005 at 6:44am

Hello,

DockingPane v9.51

how to get the ID of the selected floating pane in the theme function DrawFloatingTheme(..., CXTPDockingPaneMiniWnd* pane, ..)?

In docking mode with DrawCaption(..., CXTPDockingPaneTabbedContainer* pane, ...), I use pane->GetSelected()->GetID().

Thanks,
Magnetic Core 




Replies:
Posted By: Magnetic core
Date Posted: 05 January 2005 at 5:29am

Hello again,

Ok, I have found a solution for my problem. I give the code for this:


CXTPDockingPaneMiniWnd* pMPane = ...;
int iPaneID = -1;

if(pMPane->IsActive()) {
 CXTPDockingPaneSplitterContainer* pSplitterPane = pMPane->GetTopPane();
 if(pSplitterPane != NULL) {
  CXTPDockingPaneBaseList nTabbedList;

  pSplitterPane->FindPane(typeTabbedContainer, &nTabbedList);
  if(nTabbedList.GetCount() == 1) { // Only 1 doc
   POSITION pos = nTabbedList.GetHeadPosition();
   if(pos != NULL) {
    CXTPDockingPaneBase* pPane = nTabbedList.GetNext(pos);
    ASSERT(pPane->GetType() == typeTabbedContainer);
   
    CXTPDockingPane* pSelectedPane = ((CXTPDockingPaneTabbedContainer*)pPane)->GetSelected();
    if(pSelectedPane != NULL)
     iPaneID = pSelectedPane->GetID();
   }
  }
 }
}

Greetings,
Magnetic Core




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