Print Page | Close Window

Pane->IsHidden() Misbehaving

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=551
Printed Date: 04 December 2024 at 2:20pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Pane->IsHidden() Misbehaving
Posted By: DougW
Subject: Pane->IsHidden() Misbehaving
Date 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.




Replies:
Posted By: Oleg
Date Posted: 22 March 2004 at 11:46pm
Strange. I see "Pane Hidden: 0" when it is not pinned.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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