Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - DockingPane problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DockingPane problem

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


Joined: 08 July 2005
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote simus Quote  Post ReplyReply Direct Link To This Post Topic: DockingPane problem
    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!

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
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.031 seconds.