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

Forum Locked"XTPWM_DOCKINGPANE_NOTIFY" message never comes

 Post Reply Post Reply
Author
Message
xc-sfit View Drop Down
Newbie
Newbie


Joined: 30 June 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote xc-sfit Quote  Post ReplyReply Direct Link To This Post Topic: "XTPWM_DOCKINGPANE_NOTIFY" message never comes
    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)
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
xc-sfit View Drop Down
Newbie
Newbie


Joined: 30 June 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote xc-sfit Quote  Post ReplyReply Direct Link To This Post 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
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.141 seconds.