Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - invalid pane on XTP_DPN_PANEMENUCLICK
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

invalid pane on XTP_DPN_PANEMENUCLICK

 Post Reply Post Reply
Author
Message
andolo View Drop Down
Groupie
Groupie
Avatar

Joined: 16 November 2005
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote andolo Quote  Post ReplyReply Direct Link To This Post Topic: invalid pane on XTP_DPN_PANEMENUCLICK
    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;
    }
}
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: 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
Back to Top
andolo View Drop Down
Groupie
Groupie
Avatar

Joined: 16 November 2005
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote andolo Quote  Post ReplyReply Direct Link To This Post 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?
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: 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
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.188 seconds.