Print Page | Close Window

"XTPWM_DOCKINGPANE_NOTIFY" message never comes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Visual C++ MFC
Forum Description: Topics related to Codejock Visual C++ MFC products
URL: http://forum.codejock.com/forum_posts.asp?TID=16897
Printed Date: 21 November 2024 at 11:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: "XTPWM_DOCKINGPANE_NOTIFY" message never comes
Posted By: xc-sfit
Subject: "XTPWM_DOCKINGPANE_NOTIFY" message never comes
Date 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)
 



Replies:
Posted By: Oleg
Date Posted: 01 July 2010 at 4:47am
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


Posted By: xc-sfit
Date Posted: 05 July 2010 at 1:24am
It works.
 
Thanks. 


-------------
Product: Xtreme ToolkitPro v12.0.2
Platform: Windows 7 (32bit)
Language: Visual C++ 9.0



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net