Print Page | Close Window

CXTPDockingPaneManager.ToggleAutoHide crash

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=7592
Printed Date: 12 December 2024 at 1:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPDockingPaneManager.ToggleAutoHide crash
Posted By: inmaurik
Subject: CXTPDockingPaneManager.ToggleAutoHide crash
Date 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?



Replies:
Posted By: Oleg
Date 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


Posted By: inmaurik
Date Posted: 16 July 2007 at 2:14am
Great, it works



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