CPaneDivider 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 CPaneDivider Class.

INCLUDEcpp_fp_under_construction]

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.

class CPaneDivider : public CBasePane  

Public Constructors

NameDescription
CPaneDivider::CPaneDivider

Public Methods

NameDescription
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::GetPaneDividerStyle
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

Public Methods

NameDescription
CPaneDivider::GetPanesReturns the list of panes that reside in the CPaneContainer Class. This method should be called only for default pane dividers.
CPaneDivider::GetPaneDividersReturns the list of pane dividers that reside in the CPaneContainer Class. This method should be called only for default pane dividers.

Data Members

NameDescription
CPaneDivider::m_nDefaultWidthSpecifies the default width in pixels of all pane dividers in the application.
CPaneDivider::m_pSliderRTCHolds a pointer to the runtime class information about a CPaneDivider-derived object.

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.

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

CObject CCmdTarget CWnd

CBasePane CPaneDivider

Header: afxPaneDivider.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.

void SetAutoHideMode(BOOL bMode);

Parameters

[in] bMode

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 SetPaneContainerManager(CPaneContainerManager* 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.

virtual void AddPane(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 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

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 CDockablePane* AddRecentPane(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.

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

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 CalcFixedLayout(
    BOOL bStretch,  
    BOOL bHorz);

Parameters

[in] bStretch
[in] bHorz

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 BOOL CheckVisibility();

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.

CPaneDivider();

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

Parameters

[in] bDefaultSlider
[in] pParent

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

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 BOOL DoesAllowDynInsertBefore() 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 BOOL DoesContainFloatingPane();

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* FindPaneContainer(
    CDockablePane* pBar,  
    BOOL& bLeftBar);

Parameters

[in] pBar
[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.

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.

static int __stdcall GetDefaultWidth();

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 CBasePane* GetFirstPane() const;  

Return Value

Remarks

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

[out] lstSliders
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.

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 GetPaneDividerStyle() const;  

Return Value

Remarks

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

[out] lstBars
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.

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

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 GetWidth() 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.

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

Parameters

[in] bDefaultSlider
[in] pParent

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 BOOL InsertPane(
    CDockablePane* pBarToInsert,  
    CDockablePane* pTargetBar,  
    DWORD dwAlignment,  
    LPCRECT lpRect = NULL);

Parameters

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

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 IsAutoHideMode() 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 IsDefault() 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 IsHorizontal() const;  

Return Value

Remarks

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

AFX_IMPORT_DATA static int m_nDefaultWidth;  

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& ptOffset,  
    BOOL bAdjustLayout = TRUE);

Parameters

[in] ptOffset
[in] bAdjustLayout

Remarks

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

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

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.

void ReleaseEmptyPaneContainers();

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 BOOL ReplacePane(
    CDockablePane* pBarToReplace,  
    CDockablePane* pBarToReplaceWith);

Parameters

[in] pBarToReplace
[in] pBarToReplaceWith

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 RepositionPanes(
    CRect& rectNew,  
    HDWP& hdwp);

Parameters

[in] rectNew
[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 ShowWindow(int nCmdShow);

Parameters

[in] nCmdShow

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 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.

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

Parameters

[in] pDockingBar
[in] pTabbedBar

Remarks

Hierarchy Chart
Classes
CPaneContainerManager Class
CPaneContainer Class
CDockingManager Class
CBasePane Class

Show: