Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Reproducible crash - selecting an autohidden pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Reproducible crash - selecting an autohidden pane

 Post Reply Post Reply
Author
Message
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Topic: Reproducible crash - selecting an autohidden pane
    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!

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: 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
Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Posted: 08 January 2007 at 4:15am
Indeed, RecalcLayout() was the key to solution. Excellent, thank you.
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.