Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - ShowPane undocked
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ShowPane undocked

 Post Reply Post Reply
Author
Message
TerryT View Drop Down
Newbie
Newbie


Joined: 31 August 2006
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote TerryT Quote  Post ReplyReply Direct Link To This Post Topic: ShowPane undocked
    Posted: 27 September 2006 at 11:54pm
I've not been able to find a solution to the following:
 
In the following method, how do I get the ShowPane() to show the pane in an undocked state (pin horizontal)?
 
void CMainFrame::togglePane(UINT nPaneID)
{
    CXTPDockingPane* pPane = m_paneManager.FindPane(nPaneID);
    if(pPane)
    {
        if(pPane->IsClosed())
            m_paneManager.ShowPane(pPane);
        else
            m_paneManager.ClosePane(pPane);
    }
}
Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2006 at 7:31am
Hello,

try a call to CXTPDockingPaneManager::ToggleDocking() immediately after showing the pane (if the pane is not IsFloating() already).
Or did you mean something else with undocking?
Back to Top
TerryT View Drop Down
Newbie
Newbie


Joined: 31 August 2006
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote TerryT Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2006 at 9:15am

Thanks for pointing me in the right direction - sometimes can't see the forest for the trees...

The following solution seems to work well enough
The code to empty the message queue is required to avoid an assert if there are no panes open - seems to happen when the docking frame is being adjusted


void CMainFrame::togglePane(UINT nPaneID)
{
    CXTPDockingPane* pPane = m_paneManager.FindPane(nPaneID);
    if(pPane)
    {
        if(pPane->IsClosed())
        {
            m_paneManager.ShowPane(pPane);
            m_paneManager.ToggleAutoHide(pPane);
            EmptyMsgQueue();
            pPane->Select();
        }
        else
            m_paneManager.ClosePane(pPane);
    }
}

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.