共用方式為


CPaneContainer 類別

CPaneContainer 類別是 MFC 所實作之停駐模型的基本元件。 此類別的物件會儲存指向 CPaneContainer 的兩個停駐窗格或兩個執行個體的指標。 它也會儲存指向分隔窗格 (或容器) 的分隔線的指標。 Framework 可以將容器巢狀於容器內部,建置表示複雜停駐配置的二進位樹狀目錄。 二進位樹狀目錄的根是儲存在 CPaneContainerManager 物件中。

如需更多詳細資料,請參閱 Visual Studio 安裝位置下之 VC\atlmfc\src\mfc 資料夾中的原始程式碼。

語法

class CPaneContainer : public CObject

成員

公用建構函式

名稱 描述
CPaneContainer::CPaneContainer 預設建構函式。

公用方法

名稱 描述
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 從封存中讀取或寫入此物件。 (覆寫 CObject::Serialize。)
CPaneContainer::SetPane
CPaneContainer::SetPaneContainer
CPaneContainer::SetPaneDivider
CPaneContainer::SetParentPaneContainer
CPaneContainer::SetRecentPercent
CPaneContainer::SetUpByID
CPaneContainer::StoreRecentDockSiteInfo
CPaneContainer::StretchPaneContainer

備註

CPaneContainer 物件會由架構自動建立。

範例

下列範例示範如何建構 CPaneContainer 類別的執行個體。 此程式碼片段是設定窗格大小範例的一部分。

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

CPaneContainer::AddPane

CDockablePane* AddPane(CDockablePane* pBar);

參數

[in] pBar

傳回值

備註

CPaneContainer::AddRef

void AddRef();

備註

CPaneContainer::AddSubPaneContainer

BOOL AddSubPaneContainer(
    CPaneContainer* pContainer,
    BOOL bRightNodeNew);

參數

[in] pContainer
[in] bRightNodeNew

傳回值

備註

CPaneContainer::CalcAvailablePaneSpace

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

參數

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

傳回值

備註

CPaneContainer::CalcAvailableSpace

virtual CSize CalcAvailableSpace(
    CSize sizeStretch,
    BOOL bLeftBar);

參數

[in] sizeStretch
[in] bLeftBar

傳回值

備註

CPaneContainer::CalculateRecentSize

void CalculateRecentSize();

備註

CPaneContainer::CheckPaneDividerVisibility

void CheckPaneDividerVisibility();

備註

CPaneContainer::Copy

virtual CPaneContainer* Copy(CPaneContainer* pParentContainer);

參數

[in] pParentContainer

傳回值

備註

CPaneContainer::CPaneContainer

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

參數

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

備註

CPaneContainer::DeletePane

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

參數

[in] pBar
[in] barType

備註

CPaneContainer::FindSubPaneContainer

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

參數

[in] pObject
[in] findCriteria

傳回值

備註

CPaneContainer::FindTabbedPane

CDockablePane* FindTabbedPane(UINT nID);

參數

[in] nID

傳回值

備註

CPaneContainer::GetAssociatedSiblingPaneIDs

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

參數

[in] pBar

傳回值

備註

CPaneContainer::GetLeftPane

const CDockablePane* GetLeftPane() const;

傳回值

備註

CPaneContainer::GetLeftPaneContainer

const CPaneContainer* GetLeftPaneContainer() const;

傳回值

備註

CPaneContainer::GetMinSize

virtual void GetMinSize(CSize& size) const;

參數

[in] size

備註

CPaneContainer::GetMinSizeLeft

virtual void GetMinSizeLeft(CSize& size) const;

參數

[in] size

備註

CPaneContainer::GetMinSizeRight

virtual void GetMinSizeRight(CSize& size) const;

參數

[in] size

備註

CPaneContainer::GetNodeCount

int GetNodeCount() const;

傳回值

備註

CPaneContainer::GetPaneDivider

const CPaneDivider* GetPaneDivider() const;

傳回值

備註

CPaneContainer::GetParentPaneContainer

CPaneContainer* GetParentPaneContainer() const;

傳回值

備註

CPaneContainer::GetRecentPaneDividerRect

CRect GetRecentPaneDividerRect() const;

傳回值

備註

CPaneContainer::GetRecentPaneDividerStyle

DWORD GetRecentPaneDividerStyle() const;

傳回值

備註

CPaneContainer::GetRecentPercent

int GetRecentPercent();

傳回值

備註

CPaneContainer::GetRefCount

LONG GetRefCount();

傳回值

備註

CPaneContainer::GetResizeStep

virtual int GetResizeStep() const;

傳回值

備註

CPaneContainer::GetRightPane

const CDockablePane* GetRightPane() const;

傳回值

備註

CPaneContainer::GetRightPaneContainer

const CPaneContainer* GetRightPaneContainer() const;

傳回值

備註

CPaneContainer::GetTotalReferenceCount

int GetTotalReferenceCount() const;

傳回值

備註

CPaneContainer::GetWindowRect

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

參數

[in] rect
[in] bIgnoreVisibility

備註

CPaneContainer::IsDisposed

BOOL IsDisposed() const;

傳回值

備註

CPaneContainer::IsEmpty

BOOL IsEmpty() const;

傳回值

備註

CPaneContainer::IsLeftPane

BOOL IsLeftPane(CDockablePane* pBar) const;

參數

[in] pBar

傳回值

備註

CPaneContainer::IsLeftPaneContainer

BOOL IsLeftPaneContainer() const;

傳回值

備註

CPaneContainer::IsLeftPartEmpty

BOOL IsLeftPartEmpty(BOOL bCheckVisibility = FALSE) const;

參數

[in] bCheckVisibility

傳回值

備註

CPaneContainer::IsRightPartEmpty

BOOL IsRightPartEmpty(BOOL bCheckVisibility = FALSE) const;

參數

[in] bCheckVisibility

傳回值

備註

CPaneContainer::IsVisible

BOOL IsVisible() const;

傳回值

備註

CPaneContainer::Move

virtual void Move(CPoint ptNewLeftTop);

參數

[in] ptNewLeftTop

備註

CPaneContainer::OnDeleteHidePane

void OnDeleteHidePane(
    CDockablePane* pBar,
    BOOL bHide);

參數

[in] pBar
[in] bHide

備註

CPaneContainer::OnMoveInternalPaneDivider

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

參數

[in] nOffset
[in] hdwp

傳回值

備註

CPaneContainer::OnShowPane

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

參數

[in] pBar
[in] bShow

備註

CPaneContainer::Release

DWORD Release();

傳回值

備註

CPaneContainer::ReleaseEmptyPaneContainer

void ReleaseEmptyPaneContainer();

備註

CPaneContainer::RemoveNonValidPanes

void RemoveNonValidPanes();

備註

CPaneContainer::RemovePane

virtual void RemovePane(CDockablePane* pBar);

參數

[in] pBar

備註

CPaneContainer::Resize

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

參數

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

備註

CPaneContainer::ResizePane

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

參數

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

備註

CPaneContainer::ResizePartOfPaneContainer

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

參數

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

備註

CPaneContainer::Serialize

void Serialize(CArchive& ar);

參數

[in] ar

備註

CPaneContainer::SetPane

void SetPane(
    CDockablePane* pBar,
    BOOL bLeft);

參數

[in] pBar
[in] bLeft

備註

CPaneContainer::SetPaneContainer

void SetPaneContainer(
    CPaneContainer* pContainer,
    BOOL bLeft);

參數

[in] pContainer
[in] bLeft

備註

CPaneContainer::SetPaneDivider

void SetPaneDivider(CPaneDivider* pSlider);

參數

[in] pSlider

備註

CPaneContainer::SetParentPaneContainer

void SetParentPaneContainer(CPaneContainer* p);

參數

[in] p

備註

CPaneContainer::SetRecentPercent

void SetRecentPercent(int nRecentPercent);

參數

[in] nRecentPercent

備註

CPaneContainer::SetUpByID

BOOL SetUpByID(
    UINT nID,
    CDockablePane* pBar);

參數

[in] nID
[in] pBar

傳回值

備註

CPaneContainer::StoreRecentDockSiteInfo

virtual void StoreRecentDockSiteInfo(CDockablePane* pBar);

參數

[in] pBar

備註

CPaneContainer::StretchPaneContainer

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

參數

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

傳回值

備註

另請參閱

階層架構圖表
類別
CObject 類別
CPaneContainerManager 類別