Edit

Share via


CPaneDivider Class

For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

The CPaneDivider class divides two panes, divides two groups of panes, or separates a group of panes from the client area of the main frame window.

Syntax

class CPaneDivider : public CBasePane

Members

Public Constructors

Name Description
CPaneDivider::CPaneDivider

Public Methods

Name Description
CPaneDivider::AddPaneContainer
CPaneDivider::AddPane
CPaneDivider::AddRecentPane
CPaneDivider::CalcExpectedDockedRect
CPaneDivider::CalcFixedLayout (Overrides CBasePane::CalcFixedLayout.)
CPaneDivider::CheckVisibility
CPaneDivider::CreateEx (Overrides CBasePane::CreateEx.)
CPaneDivider::DoesAllowDynInsertBefore (Overrides CBasePane::DoesAllowDynInsertBefore.)
CPaneDivider::DoesContainFloatingPane
CPaneDivider::FindPaneContainer
CPaneDivider::FindTabbedPane
CPaneDivider::GetDefaultWidth
CPaneDivider::GetFirstPane
CPaneDivider::GetPaneDividers Returns the list of pane dividers that reside in the CPaneContainer Class. This method should be called only for default pane dividers.
CPaneDivider::GetPaneDividerStyle
CPaneDivider::GetPanes Returns the list of panes that reside in the CPaneContainer Class. This method should be called only for default pane dividers.
CPaneDivider::GetRootContainerRect
CPaneDivider::GetWidth
CPaneDivider::Init
CPaneDivider::InsertPane
CPaneDivider::IsAutoHideMode (Overrides CBasePane::IsAutoHideMode.)
CPaneDivider::IsDefault
CPaneDivider::IsHorizontal (Overrides CBasePane::IsHorizontal.)
CPaneDivider::Move
CPaneDivider::NotifyAboutRelease
CPaneDivider::OnShowPane
CPaneDivider::ReleaseEmptyPaneContainers
CPaneDivider::RemovePane
CPaneDivider::ReplacePane
CPaneDivider::RepositionPanes
CPaneDivider::Serialize (Overrides CBasePane::Serialize.)
CPaneDivider::SetAutoHideMode
CPaneDivider::SetPaneContainerManager
CPaneDivider::ShowWindow
CPaneDivider::StoreRecentDockSiteInfo
CPaneDivider::StoreRecentTabRelatedInfo
Name Description
CPaneDivider::m_nDefaultWidth Specifies the default width in pixels of all pane dividers in the application.
CPaneDivider::m_pSliderRTC Holds a pointer to the runtime class information about a CPaneDivider-derived object.

Remarks

The framework creates CPaneDivider objects automatically when a pane is docked.

There are two types of pane dividers:

  • a default pane divider is created when a group of panes is docked to a side of the main frame window. The default pane divider holds a pointer to the CPaneContainerManager Class and redirects most operations on the group of panes (such as resizing a pane, or docking another pane or container) to the container manager. Each docking pane maintains a pointer to its default pane divider.

  • A regular pane divider just divides two panes in a container. For more information, see CPaneContainer Class.

Example

The following example demonstrates how to get a CPaneDivider object from a CWorkspaceBar object. This code snippet is part of the MDI Tabs Demo sample.

// CWorkspaceBar m_wndWorkSpace
CPaneDivider *pSlider = m_wndWorkSpace.GetDefaultPaneDivider();

Inheritance Hierarchy

CObject
└ CCmdTarget
 └ CWnd
  └ CBasePane
   └ CPaneDivider

Requirements

Header: afxPaneDivider.h

CPaneDivider::SetAutoHideMode

void SetAutoHideMode(BOOL bMode);

Parameters

[in] bMode

Remarks

CPaneDivider::SetPaneContainerManager

void SetPaneContainerManager(CPaneContainerManager* p);

Parameters

[in] p

Remarks

CPaneDivider::AddPane

virtual void AddPane(CDockablePane* pBar);

Parameters

[in] pBar

Remarks

CPaneDivider::AddPaneContainer

virtual BOOL AddPaneContainer(
    CPaneContainerManager& barContainerManager,
    BOOL bOuterEdge);

virtual BOOL AddPaneContainer(
    CDockablePane* pTargetBar,
    CPaneContainerManager& barContainerManager,
    DWORD dwAlignment);

Parameters

[in] barContainerManager
[in] bOuterEdge
[in] pTargetBar
[in] dwAlignment

Return Value

Remarks

CPaneDivider::AddRecentPane

virtual CDockablePane* AddRecentPane(CDockablePane* pBar);

Parameters

[in] pBar

Return Value

Remarks

CPaneDivider::CalcExpectedDockedRect

virtual void CalcExpectedDockedRect(
    CWnd* pWndToDock,
    CPoint ptMouse,
    CRect& rectResult,
    BOOL& bDrawTab,
    CDockablePane** ppTargetBar);

Parameters

[in] pWndToDock
[in] ptMouse
[in] rectResult
[in] bDrawTab
[in] ppTargetBar

Remarks

CPaneDivider::CalcFixedLayout

virtual CSize CalcFixedLayout(
    BOOL bStretch,
    BOOL bHorz);

Parameters

[in] bStretch
[in] bHorz

Return Value

Remarks

CPaneDivider::CheckVisibility

virtual BOOL CheckVisibility();

Return Value

Remarks

CPaneDivider::CPaneDivider

CPaneDivider();

CPaneDivider(
    BOOL bDefaultSlider,
    CWnd* pParent = NULL);

Parameters

[in] bDefaultSlider
[in] pParent

Return Value

Remarks

CPaneDivider::CreateEx

virtual BOOL CreateEx(
    DWORD dwStyleEx,
    DWORD dwStyle,
    const RECT& rect,
    CWnd* pParentWnd,
    UINT nID,
    CCreateContext* pContext);

Parameters

[in] dwStyleEx
[in] dwStyle
[in] rect
[in] pParentWnd
[in] nID
[in] pContext

Return Value

Remarks

CPaneDivider::DoesAllowDynInsertBefore

virtual BOOL DoesAllowDynInsertBefore() const;

Return Value

Remarks

CPaneDivider::DoesContainFloatingPane

virtual BOOL DoesContainFloatingPane();

Return Value

Remarks

CPaneDivider::FindPaneContainer

CPaneContainer* FindPaneContainer(
    CDockablePane* pBar,
    BOOL& bLeftBar);

Parameters

[in] pBar
[in] bLeftBar

Return Value

Remarks

CPaneDivider::FindTabbedPane

CDockablePane* FindTabbedPane(UINT nID);

Parameters

[in] nID

Return Value

Remarks

CPaneDivider::GetDefaultWidth

static int __stdcall GetDefaultWidth();

Return Value

Remarks

CPaneDivider::GetFirstPane

const CBasePane* GetFirstPane() const;

Return Value

Remarks

CPaneDivider::GetPaneDividers

Returns the list of pane dividers that reside in the CPaneContainer Class. This method should be called only for default pane dividers.

void GetPaneDividers(CObList& lstSliders);

Parameters

lstSliders
[out] Contains the list of pane dividers that reside in the pane container.

Remarks

This method should be called for default pane dividers only. A default pane divider is a divider that resizes the entire pane container.

CPaneDivider::GetPaneDividerStyle

DWORD GetPaneDividerStyle() const;

Return Value

Remarks

CPaneDivider::GetPanes

Returns the list of panes that reside in the CPaneContainer Class. This method should be called only to retrieve default pane dividers.

void GetPanes(CObList& lstBars);

Parameters

lstBars
[out] Contains the list of panes that reside in the pane container.

Remarks

This method should be called for default pane dividers only. A default pane divider is a divider that resizes the entire pane container.

CPaneDivider::GetRootContainerRect

CRect GetRootContainerRect();

Return Value

Remarks

CPaneDivider::GetWidth

int GetWidth() const;

Return Value

Remarks

CPaneDivider::Init

void Init(
    BOOL bDefaultSlider = FALSE,
    CWnd* pParent = NULL);

Parameters

[in] bDefaultSlider
[in] pParent

Remarks

CPaneDivider::InsertPane

virtual BOOL InsertPane(
    CDockablePane* pBarToInsert,
    CDockablePane* pTargetBar,
    DWORD dwAlignment,
    LPCRECT lpRect = NULL);

Parameters

[in] pBarToInsert
[in] pTargetBar
[in] dwAlignment
[in] lpRect

Return Value

Remarks

CPaneDivider::IsAutoHideMode

BOOL IsAutoHideMode() const;

Return Value

Remarks

CPaneDivider::IsDefault

BOOL IsDefault() const;

Return Value

Remarks

CPaneDivider::IsHorizontal

BOOL IsHorizontal() const;

Return Value

Remarks

CPaneDivider::m_nDefaultWidth

Specifies the default width, in pixels, of all pane dividers in the application.

AFX_IMPORT_DATA static int m_nDefaultWidth;

CPaneDivider::Move

virtual void Move(
    CPoint& ptOffset,
    BOOL bAdjustLayout = TRUE);

Parameters

[in] ptOffset
[in] bAdjustLayout

Remarks

CPaneDivider::m_pSliderRTC

Holds a pointer to runtime class information about a CPaneDivider-derived object.

AFX_IMPORT_DATA static CRuntimeClass* m_pSliderRTC;

Remarks

Set this member variable if you create a custom pane divider. This enables the framework to create your pane divider when the pane is drawn.

Example

The following example shows how to set the m_pSliderRTC member variable:

class CMySplitter : public CPaneDivider
{
...
};

CPaneDivider::m_pSliderRTC = RUNTIME_CLASS(CMySpliter);

CPaneDivider::NotifyAboutRelease

virtual void NotifyAboutRelease();

Remarks

CPaneDivider::OnShowPane

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

Parameters

[in] pBar
[in] bShow

Remarks

CPaneDivider::ReleaseEmptyPaneContainers

void ReleaseEmptyPaneContainers();

Remarks

CPaneDivider::RemovePane

virtual void RemovePane(CDockablePane* pBar);

Parameters

[in] pBar

Remarks

CPaneDivider::ReplacePane

virtual BOOL ReplacePane(
    CDockablePane* pBarToReplace,
    CDockablePane* pBarToReplaceWith);

Parameters

[in] pBarToReplace
[in] pBarToReplaceWith

Return Value

Remarks

CPaneDivider::RepositionPanes

virtual void RepositionPanes(
    CRect& rectNew,
    HDWP& hdwp);

Parameters

[in] rectNew
[in] hdwp

Remarks

CPaneDivider::Serialize

void Serialize(CArchive& ar);

Parameters

[in] ar

Remarks

CPaneDivider::ShowWindow

void ShowWindow(int nCmdShow);

Parameters

[in] nCmdShow

Remarks

CPaneDivider::StoreRecentDockSiteInfo

void StoreRecentDockSiteInfo(CDockablePane* pBar);

Parameters

[in] pBar

Remarks

CPaneDivider::StoreRecentTabRelatedInfo

void StoreRecentTabRelatedInfo(
    CDockablePane* pDockingBar,
    CDockablePane* pTabbedBar);

Parameters

[in] pDockingBar
[in] pTabbedBar

Remarks

See also

Hierarchy Chart
Classes
CPaneContainerManager Class
CPaneContainer Class
CDockingManager Class
CBasePane Class