Print Page | Close Window

DockingPane problem

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=3316
Printed Date: 09 November 2025 at 12:53pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DockingPane problem
Posted By: simus
Subject: DockingPane problem
Date Posted: 01 December 2005 at 2:36am

Hi,

I have an MFC ActiveX and I used CXTPDockingPanes in it, I done exactly the same initialisation than a standard stand alone MFC project, and ...

Docking seems to work but if I redock a floating pane it results in 2 panes, the one that is docked, and another one still floating and that is totally empty(not drawn) with a title set to "Panes".

Do you have any idea in how to solve this?

Thanks a lot!




Replies:
Posted By: Oleg
Date Posted: 01 December 2005 at 4:49am

Try to search on forum WM_IDLEUPDATECMDUI...

 

Problem that WM_IDLEUPDATECMDUI not send in ActiveX MFC and you must generate it manually.  

Add Timer

SetTimer(TID_UPDATE, 100, NULL);

and update Panes:

void CDockingPaneSite::OnTimer(UINT_PTR nIDEvent)
{
 if (nIDEvent == TID_UPDATE)
 {
         UpdatePanes();
  }

  OnIdleUpdateCmdUI();
 }

 CWnd::OnTimer(nIDEvent);
}

 

 

void CDockingPaneCtrl::OleUpdatePanes()
{
 if (m_pMainWnd)
 {
  CXTPDockingPaneManager* pDockingPaneManager = m_pMainWnd->GetDockingPaneManager();
 
  pDockingPaneManager->OnIdleUpdateCmdUI(1, 1);
  
  CXTPDockingPaneLayout* pLayout = pDockingPaneManager->GetCurrentLayout();
  POSITION pos = pLayout->m_lstStack.GetHeadPosition();
  while (pos)
  {
   CXTPDockingPaneBase* pPane = pLayout->m_lstStack.GetNext(pos);
   if (pPane->GetType() == xtpPaneTypeMiniWnd && ((CXTPDockingPaneMiniWnd*)pPane)->CWnd::GetSafeHwnd())
   {
    ((CXTPDockingPaneMiniWnd*)pPane)-> ;SendMessage(WM_IDLEUPDATECMDUI, 0, 0);
   }  
  } 
 }
}



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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