Pane->IsHidden() Misbehaving |
Post Reply |
Author | |
DougW
Newbie Joined: 03 March 2004 Location: United States Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 19 March 2004 at 1:43pm |
When a pane is not pinned, the IsHidden() method seems to be misbehaving. I have added a menu update handler to check or uncheck a menu item to let me know if a pane is hidden or not (forget close for now...that works). In the menu update handler I check the pane->IsHidden and it always returns TRUE (pane is hidden) even when it's not. To reproduce, use the PaneSample project (samples\DockingPane\PaneSample). I picked on PANE5 just to make this simple. Add a message map for the menu update in the cpp file as follows: ON_UPDATE_COMMAND_UI(IDR_PANE5, OnUpdateUI_Pane5) Add the prototype to the header file: afx_msg void OnUpdateUI_Pane5(CCmdUI* pCmdUI);Here's the handler for the cpp file: void CMainFrame::OnUpdateUI_Pane5(CCmdUI* pCmdUI){ BOOL bChecked = TRUE; CXTPDockingPane* pToolBeltPane = GetDockingPaneManager()->FindPane(IDR_PANE5); if (pToolBeltPane){ TRACE("\n\nPane States\n"); BOOL bClosed = pToolBeltPane->IsClosed(); BOOL bFloating = pToolBeltPane->IsFloating(); BOOL bFocus = pToolBeltPane->IsFocus(); BOOL bHidden = pToolBeltPane->IsHidden(); BOOL bSelected = pToolBeltPane->IsSelected(); TRACE("Pane Closed: %d\n", bClosed); TRACE("Pane Floating: %d\n", bFloating); TRACE("Pane Focus: %d\n", bFocus); TRACE("Pane Hidden: %d\n", bHidden); TRACE("Pane Selected: %d\n", bSelected); } } Run and watch the output window. Make pane5 un-pinned and visible (not hidden). Now go to the menus: Docking Pane / Pane You'll see the results. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Strange. I see "Pane Hidden: 0" when it is not pinned.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |