Compartir a través de


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.

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

Name Description
CPaneDivider::GetPanes Returns the list of panes that reside in the CPaneContainer Class. This method should be called only for default pane dividers.
CPaneDivider::GetPaneDividers Returns the list of pane dividers that reside in the CPaneContainer Class. This method should be called only for default pane dividers.

Data Members

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

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

CPaneDivider::SetPaneContainerManager

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

CPaneDivider::AddPane

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

CPaneDivider::AddPaneContainer

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

CPaneDivider::AddRecentPane

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

CPaneDivider::CalcExpectedDockedRect

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

CPaneDivider::CalcFixedLayout

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

CPaneDivider::CheckVisibility

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

CPaneDivider::CPaneDivider

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

CPaneDivider::CreateEx

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

CPaneDivider::DoesAllowDynInsertBefore

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

CPaneDivider::DoesContainFloatingPane

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

CPaneDivider::FindPaneContainer

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

CPaneDivider::FindTabbedPane

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

CPaneDivider::GetDefaultWidth

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

CPaneDivider::GetFirstPane

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

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

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

CPaneDivider::GetPaneDividerStyle

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

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

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

CPaneDivider::GetRootContainerRect

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

CPaneDivider::GetWidth

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

CPaneDivider::Init

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

CPaneDivider::InsertPane

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

CPaneDivider::IsAutoHideMode

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

CPaneDivider::IsDefault

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

CPaneDivider::IsHorizontal

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

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

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

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

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

CPaneDivider::OnShowPane

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

CPaneDivider::ReleaseEmptyPaneContainers

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

CPaneDivider::RemovePane

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

CPaneDivider::ReplacePane

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

CPaneDivider::RepositionPanes

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

CPaneDivider::Serialize

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

CPaneDivider::ShowWindow

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

CPaneDivider::StoreRecentDockSiteInfo

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

CPaneDivider::StoreRecentTabRelatedInfo

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

See Also

Hierarchy Chart
Classes
CPaneContainerManager Class
CPaneContainer Class
CDockingManager Class
CBasePane Class