Print Page | Close Window

Problem after closing a 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=457
Printed Date: 10 May 2024 at 12:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem after closing a pane
Posted By: ART Pat
Subject: Problem after closing a pane
Date Posted: 20 February 2004 at 1:00pm

Hi everybody,

I want to create an application that have different (default) pane windows and I want to put a cheched item for each default pane in the View menu (like the Status Bar show/hide).

So I have two handlers to manage my state:

ON_COMMAND(ID_ART_VIEW_WORKSPACEBROWSER, OnWorkSpaceBrowser)
ON_UPDATE_COMMAND_UI(ID_ART_VIEW_WORKSPACEBROWSER, OnMenuWorkSpaceBrowser)

OnMenuWorkSpaceBrowser, I simply validate if the corresponding pane has been closed and update the checked state.

int chk = mWndPaneManager.IsPaneClosed(ID_PANE_BROWSER) ? 0 : 1;
pCmdUI->SetCheck(chk);

OnWorkSpaceBrowser, I validate if the Pane is closed and if so I recreate it.

if (mWndPaneManager.IsPaneClosed(ID_PANE_BROWSER))
{
     CXTPDockingPane* pwndworkspacebrowser = NULL;
     pwndworkspacebrowser = mWndPaneManager.CreatePane(ID_PANE_BROWSER, CRect(0, 0, 240, 120), dockRightOf);
}
else
{
   mWndPaneManager.ClosePane(ID_PANE_BROWSER);
}

The problem is that when I call IsPaneClosed, after having close the pane once, it always return True. I've traced the source code and there is a problem with the container being NULL ... did I make something wrong ?

 

Thanks,
Pat




Replies:
Posted By: ART Pat
Date Posted: 23 February 2004 at 9:07am

Hi,

I think I have found my problem, I was recreating the pane each time instead of just calling ShowPane from the Pane Manager ... it was my problem. Sorry.

Bye!

Pat




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