Share via


CPaneContainer Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CPaneContainer Class.

The CPaneContainer class is a basic component of the docking model implemented by MFC. An object of this class stores pointers to two docking panes or to two instances of CPaneContainer. It also stores a pointer to the divider that separates the panes (or the containers). By nesting containers inside containers, the framework can build a binary tree that represents complex docking layouts. The root of the binary tree is stored in a CPaneContainerManager object.

Syntax

class CPaneContainer : public CObject    

Members

Public Constructors

Name Description
CPaneContainer::CPaneContainer Default constructor.

Public Methods

Name Description
CPaneContainer::AddPane
CPaneContainer::AddRef
CPaneContainer::AddSubPaneContainer
CPaneContainer::CalcAvailablePaneSpace
CPaneContainer::CalcAvailableSpace
CPaneContainer::CalculateRecentSize
CPaneContainer::CheckPaneDividerVisibility
CPaneContainer::Copy
CPaneContainer::DeletePane
CPaneContainer::FindSubPaneContainer
CPaneContainer::FindTabbedPane
CPaneContainer::GetAssociatedSiblingPaneIDs
CPaneContainer::GetLeftPane
CPaneContainer::GetLeftPaneContainer
CPaneContainer::GetMinSize
CPaneContainer::GetMinSizeLeft
CPaneContainer::GetMinSizeRight
CPaneContainer::GetNodeCount
CPaneContainer::GetPaneDivider
CPaneContainer::GetParentPaneContainer
CPaneContainer::GetRecentPaneDividerRect
CPaneContainer::GetRecentPaneDividerStyle
CPaneContainer::GetRecentPercent
CPaneContainer::GetRefCount
CPaneContainer::GetResizeStep
CPaneContainer::GetRightPane
CPaneContainer::GetRightPaneContainer
CPaneContainer::GetTotalReferenceCount
CPaneContainer::GetWindowRect
CPaneContainer::IsDisposed
CPaneContainer::IsEmpty
CPaneContainer::IsLeftPane
CPaneContainer::IsLeftPaneContainer
CPaneContainer::IsLeftPartEmpty
CPaneContainer::IsRightPartEmpty
CPaneContainer::IsVisible
CPaneContainer::Move
CPaneContainer::OnDeleteHidePane
CPaneContainer::OnMoveInternalPaneDivider
CPaneContainer::OnShowPane
CPaneContainer::Release
CPaneContainer::ReleaseEmptyPaneContainer
CPaneContainer::RemoveNonValidPanes
CPaneContainer::RemovePane
CPaneContainer::Resize
CPaneContainer::ResizePane
CPaneContainer::ResizePartOfPaneContainer
CPaneContainer::Serialize Reads or writes this object from or to an archive. (Overrides CObject::Serialize.)
CPaneContainer::SetPane
CPaneContainer::SetPaneContainer
CPaneContainer::SetPaneDivider
CPaneContainer::SetParentPaneContainer
CPaneContainer::SetRecentPercent
CPaneContainer::SetUpByID
CPaneContainer::StoreRecentDockSiteInfo
CPaneContainer::StretchPaneContainer

Remarks

CPaneContainer objects are created automatically by the framework.

Example

The following example demonstrates how to construct an instance of the CPaneContainer class. This code snippet is part of the Set Pane Size sample.

   CPaneDialog     m_wndDlgBar;
  CPaneDivider* pDefaultPaneDivider = m_wndDlgBar.GetDefaultPaneDivider ();
    if (pDefaultPaneDivider == NULL)
    {
        AfxMessageBox (_T ("The DialogBar is not docked."));
        return;
    }

    BOOL bLeftBar = FALSE;
    CPaneContainer* pContainer = pDefaultPaneDivider->FindPaneContainer (&m_wndDlgBar, bLeftBar);    

Inheritance Hierarchy

CObject

CPaneContainer

Requirements

Header: afxpanecontainer.h

CPaneContainer::AddPane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

CDockablePane* AddPane(CDockablePane* pBar);

Parameters

[in] pBar

Return Value

Remarks

CPaneContainer::AddRef

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void AddRef();

Remarks

CPaneContainer::AddSubPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

BOOL AddSubPaneContainer(
    CPaneContainer* pContainer,  
    BOOL bRightNodeNew);

Parameters

[in] pContainer
[in] bRightNodeNew

Return Value

Remarks

CPaneContainer::CalcAvailablePaneSpace

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual int CalcAvailablePaneSpace(
    int nRequiredOffset,  
    CPane* pBar,  
    CPaneContainer* pContainer,  
    BOOL bLeftBar);

Parameters

[in] nRequiredOffset
[in] pBar
[in] pContainer
[in] bLeftBar

Return Value

Remarks

CPaneContainer::CalcAvailableSpace

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual CSize CalcAvailableSpace(
    CSize sizeStretch,  
    BOOL bLeftBar);

Parameters

[in] sizeStretch
[in] bLeftBar

Return Value

Remarks

CPaneContainer::CalculateRecentSize

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void CalculateRecentSize();

Remarks

CPaneContainer::CheckPaneDividerVisibility

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void CheckPaneDividerVisibility();

Remarks

CPaneContainer::Copy

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual CPaneContainer* Copy(CPaneContainer* pParentContainer);

Parameters

[in] pParentContainer

Return Value

Remarks

CPaneContainer::CPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

CPaneContainer(
    CPaneContainerManager* pManager = NULL,  
    CDockablePane* pLeftBar = NULL,  
    CDockablePane* pRightBar = NULL,  
    CPaneDivider* pSlider = NULL);

Parameters

[in] pManager
[in] pLeftBar
[in] pRightBar
[in] pSlider

Remarks

CPaneContainer::DeletePane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void DeletePane(
    CDockablePane* pBar,  
    BC_FIND_CRITERIA barType);

Parameters

[in] pBar
[in] barType

Remarks

CPaneContainer::FindSubPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

CPaneContainer* FindSubPaneContainer(
    const CObject* pObject,  
    BC_FIND_CRITERIA findCriteria);

Parameters

[in] pObject
[in] findCriteria

Return Value

Remarks

CPaneContainer::FindTabbedPane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

CDockablePane* FindTabbedPane(UINT nID);

Parameters

[in] nID

Return Value

Remarks

CPaneContainer::GetAssociatedSiblingPaneIDs

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

CList<UINT, UINT>* GetAssociatedSiblingPaneIDs(CDockablePane* pBar);

Parameters

[in] pBar

Return Value

Remarks

CPaneContainer::GetLeftPane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

const CDockablePane* GetLeftPane() const;  

Return Value

Remarks

CPaneContainer::GetLeftPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

const CPaneContainer* GetLeftPaneContainer() const;  

Return Value

Remarks

CPaneContainer::GetMinSize

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void GetMinSize(CSize& size) const;  

Parameters

[in] size

Remarks

CPaneContainer::GetMinSizeLeft

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void GetMinSizeLeft(CSize& size) const;  

Parameters

[in] size

Remarks

CPaneContainer::GetMinSizeRight

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void GetMinSizeRight(CSize& size) const;  

Parameters

[in] size

Remarks

CPaneContainer::GetNodeCount

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

int GetNodeCount() const;  

Return Value

Remarks

CPaneContainer::GetPaneDivider

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

const CPaneDivider* GetPaneDivider() const;  

Return Value

Remarks

CPaneContainer::GetParentPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

CPaneContainer* GetParentPaneContainer() const;  

Return Value

Remarks

CPaneContainer::GetRecentPaneDividerRect

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

CRect GetRecentPaneDividerRect() const;  

Return Value

Remarks

CPaneContainer::GetRecentPaneDividerStyle

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

DWORD GetRecentPaneDividerStyle() const;  

Return Value

Remarks

CPaneContainer::GetRecentPercent

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

int GetRecentPercent();

Return Value

Remarks

CPaneContainer::GetRefCount

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

LONG GetRefCount();

Return Value

Remarks

CPaneContainer::GetResizeStep

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual int GetResizeStep() const;  

Return Value

Remarks

CPaneContainer::GetRightPane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

const CDockablePane* GetRightPane() const;  

Return Value

Remarks

CPaneContainer::GetRightPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

const CPaneContainer* GetRightPaneContainer() const;  

Return Value

Remarks

CPaneContainer::GetTotalReferenceCount

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

int GetTotalReferenceCount() const;  

Return Value

Remarks

CPaneContainer::GetWindowRect

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void GetWindowRect(
    CRect& rect,  
    BOOL bIgnoreVisibility = FALSE) const;  

Parameters

[in] rect
[in] bIgnoreVisibility

Remarks

CPaneContainer::IsDisposed

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

BOOL IsDisposed() const;  

Return Value

Remarks

CPaneContainer::IsEmpty

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

BOOL IsEmpty() const;  

Return Value

Remarks

CPaneContainer::IsLeftPane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

BOOL IsLeftPane(CDockablePane* pBar) const;  

Parameters

[in] pBar

Return Value

Remarks

CPaneContainer::IsLeftPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

BOOL IsLeftPaneContainer() const;  

Return Value

Remarks

CPaneContainer::IsLeftPartEmpty

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

BOOL IsLeftPartEmpty(BOOL bCheckVisibility = FALSE) const;  

Parameters

[in] bCheckVisibility

Return Value

Remarks

CPaneContainer::IsRightPartEmpty

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

BOOL IsRightPartEmpty(BOOL bCheckVisibility = FALSE) const;  

Parameters

[in] bCheckVisibility

Return Value

Remarks

CPaneContainer::IsVisible

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

BOOL IsVisible() const;  

Return Value

Remarks

CPaneContainer::Move

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void Move(CPoint ptNewLeftTop);

Parameters

[in] ptNewLeftTop

Remarks

CPaneContainer::OnDeleteHidePane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void OnDeleteHidePane(
    CDockablePane* pBar,  
    BOOL bHide);

Parameters

[in] pBar
[in] bHide

Remarks

CPaneContainer::OnMoveInternalPaneDivider

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual int OnMoveInternalPaneDivider(
    int nOffset,  
    HDWP& hdwp);

Parameters

[in] nOffset
[in] hdwp

Return Value

Remarks

CPaneContainer::OnShowPane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void OnShowPane(
    CDockablePane* pBar,  
    BOOL bShow);

Parameters

[in] pBar
[in] bShow

Remarks

CPaneContainer::Release

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

DWORD Release();

Return Value

Remarks

CPaneContainer::ReleaseEmptyPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void ReleaseEmptyPaneContainer();

Remarks

CPaneContainer::RemoveNonValidPanes

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void RemoveNonValidPanes();

Remarks

CPaneContainer::RemovePane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void RemovePane(CDockablePane* pBar);

Parameters

[in] pBar

Remarks

CPaneContainer::Resize

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void Resize(
    CRect rect,  
    HDWP& hdwp,  
    BOOL bRedraw = FALSE);

Parameters

[in] rect
[in] hdwp
[in] bRedraw

Remarks

CPaneContainer::ResizePane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void ResizePane(
    int nOffset,  
    CPane* pBar,  
    CPaneContainer* pContainer,  
    BOOL bHorz,  
    BOOL bLeftBar,  
    HDWP& hdwp);

Parameters

[in] nOffset
[in] pBar
[in] pContainer
[in] bHorz
[in] bLeftBar
[in] hdwp

Remarks

CPaneContainer::ResizePartOfPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void ResizePartOfPaneContainer(
    int nOffset,  
    BOOL bLeftPart,  
    HDWP& hdwp);

Parameters

[in] nOffset
[in] bLeftPart
[in] hdwp

Remarks

CPaneContainer::Serialize

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void Serialize(CArchive& ar);

Parameters

[in] ar

Remarks

CPaneContainer::SetPane

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void SetPane(
    CDockablePane* pBar,  
    BOOL bLeft);

Parameters

[in] pBar
[in] bLeft

Remarks

CPaneContainer::SetPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void SetPaneContainer(
    CPaneContainer* pContainer,  
    BOOL bLeft);

Parameters

[in] pContainer
[in] bLeft

Remarks

CPaneContainer::SetPaneDivider

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void SetPaneDivider(CPaneDivider* pSlider);

Parameters

[in] pSlider

Remarks

CPaneContainer::SetParentPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void SetParentPaneContainer(CPaneContainer* p);

Parameters

[in] p

Remarks

CPaneContainer::SetRecentPercent

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

void SetRecentPercent(int nRecentPercent);

Parameters

[in] nRecentPercent

Remarks

CPaneContainer::SetUpByID

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

BOOL SetUpByID(
    UINT nID,  
    CDockablePane* pBar);

Parameters

[in] nID
[in] pBar

Return Value

Remarks

CPaneContainer::StoreRecentDockSiteInfo

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual void StoreRecentDockSiteInfo(CDockablePane* pBar);

Parameters

[in] pBar

Remarks

CPaneContainer::StretchPaneContainer

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

virtual int StretchPaneContainer(
    int nOffset,  
    BOOL bStretchHorz,  
    BOOL bLeftBar,  
    BOOL bMoveSlider,  
    HDWP& hdwp);

Parameters

[in] nOffset
[in] bStretchHorz
[in] bLeftBar
[in] bMoveSlider
[in] hdwp

Return Value

Remarks

See Also

Hierarchy Chart
Classes
CObject Class
CPaneContainerManager Class