Print Page | Close Window

invalid pane on XTP_DPN_PANEMENUCLICK

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=3426
Printed Date: 12 December 2024 at 3:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: invalid pane on XTP_DPN_PANEMENUCLICK
Posted By: andolo
Subject: invalid pane on XTP_DPN_PANEMENUCLICK
Date Posted: 20 December 2005 at 7:48am
Hi,
i need yor help please:

I want to handle XTP_DPN_PANEMENUCLICK. But when the lParam in this case doesn't point to a valid CXTPDockingPane.
What is wrong or how can i get the pane who sends the message?




LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
     CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;

    switch ((int)wParam)
    {
       case XTP_DPN_SHOWWINDOW:
          // here pPane is valid
          break;

       case XTP_DPN_PANEMENUCLICK:
          // here pPane is invalid
          break;
    }
}



Replies:
Posted By: Oleg
Date Posted: 20 December 2005 at 1:31pm

because lParam is XTP_DOCKINGPANE_CLICK pointer.

XTP_DOCKINGPANE_CLICK* pClick = (XTP_DOCKINGPANE_CLICK*)lParam;

lParam depends on wParam value.

move CXTPDockingPane* pPane = (CXTPDockingPane*)lParam; to scope of case XTP_DPN_SHOWWINDOW. 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: andolo
Date Posted: 21 December 2005 at 2:29am
Thanks, that helps! But i could not find it in the documentation. Is there any description for these parameters?


Posted By: Oleg
Date Posted: 21 December 2005 at 2:44am

Yes, sorry was not documented :(

Use it as:

XTP_DOCKINGPANE_CLICK* pClick = (XTP_DOCKINGPANE_CLICK*)lParam;

CXTPDockingPane* pPane = pClick->pPane.

 

 

 

ps. structure declaration

struct XTP_DOCKINGPANE_CLICK
{
 CXTPDockingPane* pPane;
 CPoint pt;
 CRect rcExclude;
};



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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