Is this correct way of creating docking panes? |
Post Reply |
Author | |
DevDon
Newbie Joined: 12 June 2007 Status: Offline Points: 18 |
Post Options
Thanks(0)
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~
|
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
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; } |
|
DevDon
Newbie Joined: 12 June 2007 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
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~
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |