"XTPWM_DOCKINGPANE_NOTIFY" message never comes |
Post Reply |
Author | |
xc-sfit
Newbie Joined: 30 June 2010 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 30 June 2010 at 10:26pm |
I refer to the example code to try to add a docking pane in my window.
I add the following code into the "OnCreate" function of the window:
m_paneManager.InstallDockingPanes(this);
m_paneManager.SetTheme(xtpPaneThemeOffice2003); m_paneManager.SetDefaultPaneOptions(xtpPaneNoCloseable|xtpPaneNoDockable|xtpPaneNoFloatable); m_paneManager.CreatePane(ID_DOCK, CRect(0,0,0,0), xtpPaneDockTop); And I add ON_MESSAGE(XTPWM_DOCKINGPANE_NOTIFY, OnDockingPaneNotify) in the message map definition. In the OnDockingPaneNotify function, I handle the case "wParam == XTP_DPN_SHOWWINDOW" just like the example code.
When I run my app, the docking pane doesn't been created correctly. I debug the program and find that the function OnDockingPaneNotify doesn't been called. It seems that the "XTPWM_DOCKINGPANE_NOTIFY" message with the wParam "XTP_DPN_SHOWWINDOW" doesn't been sent to my window. Then, I change my code above in the "OnCreate" function to:
m_paneManager.InstallDockingPanes(this);
m_paneManager.SetTheme(xtpPaneThemeOffice2003); m_paneManager.SetDefaultPaneOptions(xtpPaneNoCloseable|xtpPaneNoDockable|xtpPaneNoFloatable); CXTPDockingPane * pPane = m_paneManager.CreatePane(ID_DOCK, CRect(0,0,0,0), xtpPaneDockTop);
this->SendMessage(XTPWM_DOCKINGPANE_NOTIFY, (WPARAM)XTP_DPN_SHOWWINDOW, (LPARAM)pPane); This time everything is OK. The pane can be created properly, but I wonder why this could be happen. In the example code, it is no need to send the XTPWM_DOCKINGPANE_NOTIFY message.
My env is
Product: Xtreme ToolkitPro v12.0.2
Platform: Windows 7 (32bit) Language: Visual C++ 9.0 (VS 2008) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
maybe because CRect(0,0,0,0). Try to change to CRect(0, 0, 200, 200);
XTP_DPN_SHOWWINDOW is sent only when Pane become visible... |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
xc-sfit
Newbie Joined: 30 June 2010 Status: Offline Points: 2 |
Post Options
Thanks(0)
|
It works.
Thanks.
|
|
Product: Xtreme ToolkitPro v12.0.2
Platform: Windows 7 (32bit) Language: Visual C++ 9.0 |
|
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 |