Print Page | Close Window

Is this correct way of creating docking panes?

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=11217
Printed Date: 13 May 2025 at 1:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Is this correct way of creating docking panes?
Posted By: DevDon
Subject: Is this correct way of creating docking panes?
Date Posted: 26 June 2008 at 10:45am

Hi ,

 
My application is creating 6 panes following this procedure .
 
1. Create new Dialog box  object
2. Create new Dialog box 
3. Use Dialog box id in  create Pane  function
 
It creates 6 panes following the same procedure ...After this it attaches all panes .
 
1. m_pControlDlg = new CMControlDlg(m_pSetupAutoRun,  m_pStatusMessage, m_pParent);
 
2. m_pControlDlg ->Create(IDD_AutoRunStatusDlg,
  
    //dock autorun status dlg
3.    bRet = m_pDockingPaneManager->CreatePane(IDD_AutoRunStatusDlg, rectDialog,MdockBottomOf);
 
 
When I undock this 6 pane container It doesnot let me switch between panes . It locks up .
Do you think It is happening  because of above wany of creating panes?
 
 
 


-------------
Developer~



Replies:
Posted By: Smucker
Date Posted: 26 June 2008 at 1:57pm
I don't know if this is the best way, but I use CFormView for dialogs in panes.

I create the pane in OnCreate:

  CXTPDockingPane* pwndPane =
    m_paneManager.CreatePane(IDR_PANE_FIND, CRect(0, 0,100, 100),
    xtpPaneDockLeft);

I create the form view in OnDockingPaneNotify:

LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam,
  LPARAM lParam)
{
  if (wParam == XTP_DPN_SHOWWINDOW)
  {
    CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;
    if (!pPane->IsValid())
    {
      switch (pPane->GetID())
      {
      case IDR_PANE_FIND:
         m_pwndFind = (CMyFormView *)pPane->AttachView(this,
           RUNTIME_CLASS(CMyFormView));
      //...
      }
    }
    return TRUE;
  }
  return FALSE;
}


Posted By: DevDon
Date Posted: 27 June 2008 at 2:31pm

Thanks  Smucker .....

Got ur way of  creating dialogs 
 
you r creating pane first and then ...typecasting obj to dialog class
Here I am creating dialogs first and using their id to pass in CreatePane .
 
 ... still wondering  the way  I am implementing is right or wrong .... 
 
Oleg can you give your suggestion too ?
 
 


-------------
Developer~



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