I have a following object "construct" tree in my app:
CMainframe | ->CView | ->CXTPTabControl | ->CXTResizeFormView (several, each one in it's own tab)
I try to create panes inside the CXTResizeFormView objects but so far no luck? How should I do this to make it work? I'm a newbie with panes and basically what I have tried is copied from one sample.
Here's what I have added to the class header: --- class CServersView : public CXTResizeFormView { public: CXTPDockingPaneManager m_paneManager; dlgAddServer paneFilterServer; afx_msg LRESULT OnDockingPaneNotify(WPARAM wParam, LPARAM lParam); protected: virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); ---
And in the class source I have following trying to create a "dialog" inside the pane: --- void CServersView::OnInitialUpdate() { CXTResizeFormView::OnInitialUpdate();
VERIFY(m_paneManager.InstallDockingPanes(this)); m_paneManager.SetTheme(xtpPaneThemeVisualStudio2010); m_paneManager.SetShowContentsWhileDragging(TRUE); m_paneManager.SetAlphaDockingContext(TRUE);
CXTPDockingPane* pwndPaneFilter = m_paneManager.CreatePane(IDR_PANE_SERVER_FILTER, CRect(0, 0, 200, 120), xtpPaneDockLeft); pwndPaneFilter->SetTitle(_T("Empty Pane")); }
LRESULT CServersView::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam) { if(wParam == XTP_DPN_SHOWWINDOW) { CXTPDockingPane* pPane = (CXTPDockingPane*)lParam; if(!pPane->IsValid()) { switch(pPane->GetID()) { case IDR_PANE_SERVER_FILTER: if(!::IsWindow(paneFilterServer.m_hWnd)) { paneFilterServer.Create(IDD_DIALOG_ADD_SERVER, this); } break; } pPane->Attach(&paneFilterServer); } return TRUE; } return FALSE; } ---
What I have missed here?
|