Share via


CPaneContainer, classe

La classe CPaneContainer est un composant de base du modèle d’ancrage implémenté par MFC. Un objet de cette classe stocke des pointeurs vers deux volets d’ancrage ou deux instances de CPaneContainer. Il stocke également un pointeur vers le séparateur qui sépare les volets (ou les conteneurs). En imbriquant des conteneurs dans des conteneurs, l’infrastructure peut générer un arbre binaire qui représente des dispositions d’ancrage complexes. La racine de l’arborescence binaire est stockée dans un objet CPaneContainerManager.

Pour plus d’informations, consultez le code source situé dans le dossier VC\atlmfc\src\mfc de votre installation de Visual Studio.

Syntaxe

class CPaneContainer : public CObject

Membres

Constructeurs publics

Nom Description
CPaneContainer::CPaneContainer Constructeur par défaut.

Méthodes publiques

Nom 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 Lit ou écrit cet objet dans une archive. (Substitue CObject::Serialize.)
CPaneContainer::SetPane
CPaneContainer::SetPaneContainer
CPaneContainer::SetPaneDivider
CPaneContainer::SetParentPaneContainer
CPaneContainer::SetRecentPercent
CPaneContainer::SetUpByID
CPaneContainer::StoreRecentDockSiteInfo
CPaneContainer::StretchPaneContainer

Notes

CPaneContainer objets sont créés automatiquement par l’infrastructure.

Exemple

L’exemple suivant montre comment construire une instance de la classe CPaneContainer. Cet extrait de code fait partie de l’exemple Définir la taille du volet.

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

Hiérarchie d'héritage

CObject

CPaneContainer

Spécifications

En-tête: afxpanecontainer.h

CPaneContainer::AddPane

CDockablePane* AddPane(CDockablePane* pBar);

Paramètres

[in] pBar

Valeur de retour

Notes

CPaneContainer::AddRef

void AddRef();

Notes

CPaneContainer::AddSubPaneContainer

BOOL AddSubPaneContainer(
    CPaneContainer* pContainer,
    BOOL bRightNodeNew);

Paramètres

[in] pContainer
[in] bRightNodeNew

Valeur de retour

Notes

CPaneContainer::CalcAvailablePaneSpace

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

Paramètres

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

Valeur de retour

Notes

CPaneContainer::CalcAvailableSpace

virtual CSize CalcAvailableSpace(
    CSize sizeStretch,
    BOOL bLeftBar);

Paramètres

[in] sizeStretch
[in] bLeftBar

Valeur de retour

Notes

CPaneContainer::CalculateRecentSize

void CalculateRecentSize();

Notes

CPaneContainer::CheckPaneDividerVisibility

void CheckPaneDividerVisibility();

Notes

CPaneContainer::Copy

virtual CPaneContainer* Copy(CPaneContainer* pParentContainer);

Paramètres

[in] pParentContainer

Valeur de retour

Notes

CPaneContainer::CPaneContainer

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

Paramètres

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

Notes

CPaneContainer::DeletePane

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

Paramètres

[in] pBar
[in] barType

Notes

CPaneContainer::FindSubPaneContainer

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

Paramètres

[in] pObject
[in] findCriteria

Valeur de retour

Notes

CPaneContainer::FindTabbedPane

CDockablePane* FindTabbedPane(UINT nID);

Paramètres

[in] nID

Valeur de retour

Notes

CPaneContainer::GetAssociatedSiblingPaneIDs

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

Paramètres

[in] pBar

Valeur de retour

Notes

CPaneContainer::GetLeftPane

const CDockablePane* GetLeftPane() const;

Valeur de retour

Notes

CPaneContainer::GetLeftPaneContainer

const CPaneContainer* GetLeftPaneContainer() const;

Valeur de retour

Notes

CPaneContainer::GetMinSize

virtual void GetMinSize(CSize& size) const;

Paramètres

[in] taille

Notes

CPaneContainer::GetMinSizeLeft

virtual void GetMinSizeLeft(CSize& size) const;

Paramètres

[in] taille

Notes

CPaneContainer::GetMinSizeRight

virtual void GetMinSizeRight(CSize& size) const;

Paramètres

[in] taille

Notes

CPaneContainer::GetNodeCount

int GetNodeCount() const;

Valeur de retour

Notes

CPaneContainer::GetPaneDivider

const CPaneDivider* GetPaneDivider() const;

Valeur de retour

Notes

CPaneContainer::GetParentPaneContainer

CPaneContainer* GetParentPaneContainer() const;

Valeur de retour

Notes

CPaneContainer::GetRecentPaneDividerRect

CRect GetRecentPaneDividerRect() const;

Valeur de retour

Notes

CPaneContainer::GetRecentPaneDividerStyle

DWORD GetRecentPaneDividerStyle() const;

Valeur de retour

Notes

CPaneContainer::GetRecentPercent

int GetRecentPercent();

Valeur de retour

Notes

CPaneContainer::GetRefCount

LONG GetRefCount();

Valeur de retour

Notes

CPaneContainer::GetResizeStep

virtual int GetResizeStep() const;

Valeur de retour

Notes

CPaneContainer::GetRightPane

const CDockablePane* GetRightPane() const;

Valeur de retour

Notes

CPaneContainer::GetRightPaneContainer

const CPaneContainer* GetRightPaneContainer() const;

Valeur de retour

Notes

CPaneContainer::GetTotalReferenceCount

int GetTotalReferenceCount() const;

Valeur de retour

Notes

CPaneContainer::GetWindowRect

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

Paramètres

[in] rect
[in] bIgnoreVisibility

Notes

CPaneContainer::IsDisposed

BOOL IsDisposed() const;

Valeur de retour

Notes

CPaneContainer::IsEmpty

BOOL IsEmpty() const;

Valeur de retour

Notes

CPaneContainer::IsLeftPane

BOOL IsLeftPane(CDockablePane* pBar) const;

Paramètres

[in] pBar

Valeur de retour

Notes

CPaneContainer::IsLeftPaneContainer

BOOL IsLeftPaneContainer() const;

Valeur de retour

Notes

CPaneContainer::IsLeftPartEmpty

BOOL IsLeftPartEmpty(BOOL bCheckVisibility = FALSE) const;

Paramètres

[in] bCheckVisibility

Valeur de retour

Notes

CPaneContainer::IsRightPartEmpty

BOOL IsRightPartEmpty(BOOL bCheckVisibility = FALSE) const;

Paramètres

[in] bCheckVisibility

Valeur de retour

Notes

CPaneContainer::IsVisible

BOOL IsVisible() const;

Valeur de retour

Notes

CPaneContainer::Move

virtual void Move(CPoint ptNewLeftTop);

Paramètres

[in] ptNewLeftTop

Notes

CPaneContainer::OnDeleteHidePane

void OnDeleteHidePane(
    CDockablePane* pBar,
    BOOL bHide);

Paramètres

[in] pBar
[in] bHide

Notes

CPaneContainer::OnMoveInternalPaneDivider

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

Paramètres

[in] nOffset
[in] hdwp

Valeur de retour

Notes

CPaneContainer::OnShowPane

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

Paramètres

[in] pBar
[in] bShow

Notes

CPaneContainer::Release

DWORD Release();

Valeur de retour

Notes

CPaneContainer::ReleaseEmptyPaneContainer

void ReleaseEmptyPaneContainer();

Notes

CPaneContainer::RemoveNonValidPanes

void RemoveNonValidPanes();

Notes

CPaneContainer::RemovePane

virtual void RemovePane(CDockablePane* pBar);

Paramètres

[in] pBar

Notes

CPaneContainer::Resize

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

Paramètres

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

Notes

CPaneContainer::ResizePane

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

Paramètres

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

Notes

CPaneContainer::ResizePartOfPaneContainer

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

Paramètres

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

Notes

CPaneContainer::Serialize

void Serialize(CArchive& ar);

Paramètres

[in] ar

Notes

CPaneContainer::SetPane

void SetPane(
    CDockablePane* pBar,
    BOOL bLeft);

Paramètres

[in] pBar
[in] bLeft

Notes

CPaneContainer::SetPaneContainer

void SetPaneContainer(
    CPaneContainer* pContainer,
    BOOL bLeft);

Paramètres

[in] pContainer
[in] bLeft

Notes

CPaneContainer::SetPaneDivider

void SetPaneDivider(CPaneDivider* pSlider);

Paramètres

[in] pSlider

Notes

CPaneContainer::SetParentPaneContainer

void SetParentPaneContainer(CPaneContainer* p);

Paramètres

[in] p

Notes

CPaneContainer::SetRecentPercent

void SetRecentPercent(int nRecentPercent);

Paramètres

[in] nRecentPercent

Notes

CPaneContainer::SetUpByID

BOOL SetUpByID(
    UINT nID,
    CDockablePane* pBar);

Paramètres

[in] nID
[in] pBar

Valeur de retour

Notes

CPaneContainer::StoreRecentDockSiteInfo

virtual void StoreRecentDockSiteInfo(CDockablePane* pBar);

Paramètres

[in] pBar

Notes

CPaneContainer::StretchPaneContainer

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

Paramètres

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

Valeur de retour

Notes

Voir aussi

Graphique hiérarchique
Classes
CObject, classe
CPaneContainerManager, classe