Problem after closing a pane |
Post Reply |
Author | |
ART Pat
Newbie Joined: 20 February 2004 Location: Canada Status: Offline Points: 2 |
Post Options
Thanks(0)
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) 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, |
|
ART Pat
Newbie Joined: 20 February 2004 Location: Canada Status: Offline Points: 2 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |