Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Problem after closing a pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem after closing a pane

 Post Reply Post Reply
Author
Message
ART Pat View Drop Down
Newbie
Newbie


Joined: 20 February 2004
Location: Canada
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ART Pat Quote  Post ReplyReply Direct Link To This Post Topic: Problem after closing a pane
    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

Back to Top
ART Pat View Drop Down
Newbie
Newbie


Joined: 20 February 2004
Location: Canada
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ART Pat Quote  Post ReplyReply Direct Link To This Post 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

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.188 seconds.