Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Pane->IsHidden() Misbehaving
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pane->IsHidden() Misbehaving

 Post Reply Post Reply
Author
Message
DougW View Drop Down
Newbie
Newbie
Avatar

Joined: 03 March 2004
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougW Quote  Post ReplyReply Direct Link To This Post Topic: Pane->IsHidden() Misbehaving
    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.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2004 at 11:46pm
Strange. I see "Pane Hidden: 0" when it is not pinned.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.172 seconds.