Print Page | Close Window

Reproducible crash - selecting an autohidden pane

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=6004
Printed Date: 17 May 2024 at 8:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Reproducible crash - selecting an autohidden pane
Posted By: akur
Subject: Reproducible crash - selecting an autohidden pane
Date Posted: 05 January 2007 at 6:26am
We use XTP 10.1; in the "PaneActions" sample try to close all panes (from GUI), then call a method like this:

void CMainFrame::OnDoCrashAction()
{
    CXTPDockingPane* pPaneResourceView = m_paneManager.FindPane(IDR_PANE_RESOURCEVIEW);
    if (pPaneResourceView)
    {
        m_paneManager.ShowPane(pPaneResourceView);
        m_paneManager.ToggleAutoHide(pPaneResourceView);
        pPaneResourceView->Select();
    }
}


With this code I'd like to re-open an autohidden pane and select it. However, first I get an assert complaining about atlmfc\include\afxwin2.inl, line 150. If I click ignore, then it's OK until I hover the mouse above the newly opened ResourceView. By this hovering I get a crash: an access violation inside CXTPDockingPaneAutoHidePanel::OnMouseHover(). The value of m_pActiveWnd->m_pPane is 0xfeeefeee.

Do you know any workaround for this?
Any fixes available in newer versions?

Thank you, in advance!




Replies:
Posted By: Oleg
Date Posted: 05 January 2007 at 9:05am
Hi,
 
This code works for me:
 
 CXTPDockingPane* pPaneResourceView = m_paneManager.FindPane(IDR_PANE_RESOURCEVIEW);
    if (pPaneResourceView)
    {
  m_paneManager.ShowPane(pPaneResourceView);
  pPaneResourceView->Hide();
  RecalcLayout();
        pPaneResourceView->Select();
    }


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


Posted By: akur
Date Posted: 08 January 2007 at 4:15am
Indeed, RecalcLayout() was the key to solution. Excellent, thank you.



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