Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - XTPWM_DOCKINGPANE_NOTIFY message never comes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

XTPWM_DOCKINGPANE_NOTIFY message never comes

 Post Reply Post Reply
Author
Message Reverse Sort Order
jingstromer View Drop Down
Newbie
Newbie


Joined: 10 October 2007
Location: Sweden
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jingstromer Quote  Post ReplyReply Direct Link To This Post Topic: XTPWM_DOCKINGPANE_NOTIFY message never comes
    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 dockable

m_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 layout

CXTPDockingPaneLayout 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
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.109 seconds.