XTPWM_DOCKINGPANE_NOTIFY message never comes |
Post Reply |
Author | |
jingstromer
Newbie Joined: 10 October 2007 Location: Sweden Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 10 October 2007 at 4:48am |
Hi,
I have followed the example to add a docking pane to my application, this used to work with version 8.6, but now with the 11.2 trial version I don't receive the XTPWM_DOCKINGPANE_NOTIFY message, so the pane is not created.
When is the message not sent?
Here is my code in MainFrame.cpp:
BEGIN_MESSAGE_MAP(CMainFrame, CXTPMDIFrameWnd) ...ON_MESSAGE(XTPWM_DOCKINGPANE_NOTIFY, OnDockingPaneNotify) ... END_MESSAGE_MAP()
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct){ if (CXTPMDIFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolBar.LoadToolBar(IDR_TOOLBAR1)) { TRACE0( "Failed to create toolbar\n"); return -1; // fail to create} if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))){ TRACE0( "Failed to create status bar\n"); return -1; // fail to create} // TODO: Delete these three lines if you don't want the toolbar to // be dockablem_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_wndToolBar); m_paneManager.InstallDockingPanes( this);m_paneManager.SetTheme(xtpPaneThemeOffice); //Create docking panes. //JITEST //CXTPDockingPane* pwdPane1 = m_paneManager.CreatePane(IDR_OPTIONS, CRect(0, 0, 200, 120), dockLeftOf); //CXTPDockingPane* pwdPane2 = m_paneManager.CreatePane(IDR_OUTPUT, CRect(0, 0, 200, 120), dockLeftOf, pwdPane1);CXTPDockingPane* pwdPane1 = m_paneManager.CreatePane(IDR_OPTIONS, CRect(0, 0, 200, 120), xtpPaneDockLeft); CXTPDockingPane* pwdPane2 = m_paneManager.CreatePane(IDR_OUTPUT, CRect(0, 0, 200, 120), xtpPaneDockLeft, pwdPane1); //Load layoutCXTPDockingPaneLayout layoutNormal(&m_paneManager); if (layoutNormal.Load(_T("NormalLayout"))){ m_paneManager.SetLayout(&layoutNormal); } return 0;}
LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{ if (wParam == XTP_DPN_SHOWWINDOW){ CXTPDockingPane* pPane = (CXTPDockingPane*)lParam; if (!pPane->IsValid()){ switch (pPane->GetID()){ case IDR_OPTIONS:{ if (m_paneToolbars.GetSafeHwnd() == 0){ m_paneToolbars.Create(_T( "STATIC"), NULL, WS_CHILD, CRect(0, 0, 0, 0), this, 0);} pPane->Attach(m_paneToolbars.CreateTreeView()); break;} case IDR_OUTPUT:{ if (m_paneOutput.GetSafeHwnd() == 0){ m_paneOutput.Create(_T( "STATIC"), NULL, WS_CHILD, CRect(0, 0, 0, 0), this, 0);} pPane->Attach(m_paneOutput.CreateOutputView()); break;} } } return TRUE;} return FALSE;} |
|
jingstromer
|
|
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 |