Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - CXTPDockingPaneManager.ToggleAutoHide crash
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPDockingPaneManager.ToggleAutoHide crash

 Post Reply Post Reply
Author
Message
inmaurik View Drop Down
Groupie
Groupie


Joined: 13 July 2007
Location: Netherlands
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote inmaurik Quote  Post ReplyReply Direct Link To This Post Topic: CXTPDockingPaneManager.ToggleAutoHide crash
    Posted: 13 July 2007 at 8:13am
I was looking at the GUI_VisualStudio_vc80 sample of Xtreme ToolkitPro v11.1.3.
 
When I open the pane menu (which shown via the XTPWM_DOCKINGPANE_NOTIFY message with wParam  XTP_DPN_PANEMENUCLICK ) and select 'AutoHide' the ToggleAutoHide function is called.
So fare this is ok but when I make the pane visible (autohide is still active) and select 'AutoHide' from that same menu again the application crashes. Using the pin / unpin works OK but via the menu the ToggleAutoHide does not work.
 
I want to implement the same menu in my own application but due to this bug I have to remove the AutoHide function from the menu or make a workaround for this bug.
 
Does anybody know how to make the ToggleAutoHide call function correctly?
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: 16 July 2007 at 1:21am
Hello,
 
Thanks you're right :( ts indeed bug in our code.
 
Can you please patch CXTPDockingPaneTabbedContainer::OnCaptionButtonDown method and add
 
InternalAddRef();, InternalRelease(); calls:
 
 
 
BOOL CXTPDockingPaneTabbedContainer::OnCaptionButtonDown(CXTPDockingPaneCaptionButton* pButton)
{
 switch (pButton->GetID())
 {
 case XTP_IDS_DOCKINGPANE_MENU:
  if (m_pSelectedPane)
  {
   InternalAddRef();
   CXTPDockingPaneManager* pManager = GetDockingPaneManager();
   XTP_DOCKINGPANE_CLICK menu;
   menu.rcExclude = pButton->GetRect();
   ClientToScreen(&menu.rcExclude);
   menu.pt = CPoint(menu.rcExclude.left, menu.rcExclude.bottom);
   menu.pPane = m_pSelectedPane;
   pButton->m_bPressed = TRUE;
   Invalidate(FALSE);
   pManager->NotifyOwner(XTP_DPN_PANEMENUCLICK, (LPARAM)&menu);
   pButton->m_bPressed = FALSE;
   if (m_hWnd) Invalidate(FALSE);
   InternalRelease();
  }
  return TRUE;
 }
 return FALSE;
}
 
rebuild dll and your application after.
 
Thank you
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
inmaurik View Drop Down
Groupie
Groupie


Joined: 13 July 2007
Location: Netherlands
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote inmaurik Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2007 at 2:14am
Great, it works
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.