CPaneContainer Class

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

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.

class CPaneContainer : public CObject    

Public Constructors

NameDescription
CPaneContainer::CPaneContainerDefault constructor.

Public Methods

NameDescription
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::SerializeReads 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.

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);	

CObject

CPaneContainer

Header: afxpanecontainer.h

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Hierarchy Chart
Classes
CObject Class
CPaneContainerManager Class

Show: