Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Is this correct way  of creating docking panes?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Is this correct way of creating docking panes?

 Post Reply Post Reply
Author
Message
DevDon View Drop Down
Newbie
Newbie


Joined: 12 June 2007
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote DevDon Quote  Post ReplyReply Direct Link To This Post Topic: Is this correct way of creating docking panes?
    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~
Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post 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;
}
Back to Top
DevDon View Drop Down
Newbie
Newbie


Joined: 12 June 2007
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote DevDon Quote  Post ReplyReply Direct Link To This Post 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~
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.172 seconds.