Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - BUG  Crash in ClosePane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

BUG Crash in ClosePane

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


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Topic: BUG Crash in ClosePane
    Posted: 08 August 2011 at 2:02pm
XTP 15.02 with Visual Studio 2010 on W7

I have a reproducible bug when calling

CXTPDockingPane* ppane = m_paneManager.FindPane(ID);
if (ppane) {
   if (ppane->IsClosed()) {
       ppane->SetEnabled(xtpPaneEnabled);
       m_paneManager.ShowPane(ppane);
   }
   else {
       ppane->SetEnabled(xtpPaneDisabled);
       m_paneManager.ClosePane(ppane);
   }
}

XTP crashes in NotifyAction()

void CXTPDockingPaneAutoHidePanel::CloseActiveWindow(BOOL bDelayed)
{
    if (!m_bCloseActiveWindow)
        return;

    if (m_pActiveWnd)
    {
        if (m_pActiveWnd->m_pPane)
        {

//
BUG m_pActiveWnd->m_pPane->GetSelected() is NULL

            if (GetDockingPaneManager()->NotifyAction(xtpPaneActionCollapsing, m_pActiveWnd->m_pPane->GetSelected()))
                return;

            GetDockingPaneManager()->NotifyAction(xtpPaneActionCollapsed,
                m_pActiveWnd->m_pPane->GetSelected());
        }

If the pane I'm trying to close is an autohide panel (IsHidden() returns true) and the pane is currently visible (opened but in auto-hide mode).




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: 09 August 2011 at 7:07am
Thanks, fixed.

btw, maybe you need xtpPaneEnableActions instead of xtpPaneDisabled to disable client part only but not all actions...
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2011 at 9:06am
I, Oleg

thanks. Can I make a work-around in your code so it works here till your next update?

You Wrote:

maybe you need xtpPaneEnableActions instead of xtpPaneDisabled to disable client part only but not all actions...

Thanks. I will look into this.

My code just wants to implement a method for the user to open/close panes via the keyboard. If a pane is a auto-hide pane I want to close it when it is not visible (collapsed) and hide it when it is visible.
Closing/Showing normal panes that way works, but not for auto-hide panes.

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: 10 August 2011 at 4:11am
Hi,

Problem can be reproduced only if you set xtpPaneDisabled   - without it it won't crush. So most easy workaround here to not set xtpPaneDisabled  before Close.


Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2011 at 8:44am
Ah, very well. Will do. Thanks!
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.203 seconds.