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.
class CPaneDivider : public CBasePane
Name | Description |
---|---|
CPaneDivider::CPaneDivider |
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. |
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
void SetAutoHideMode(BOOL bMode);
[in] bMode
void SetPaneContainerManager(CPaneContainerManager* p);
[in] p
virtual void AddPane(CDockablePane* pBar);
[in] pBar
virtual BOOL AddPaneContainer(
CPaneContainerManager& barContainerManager,
BOOL bOuterEdge);
virtual BOOL AddPaneContainer(
CDockablePane* pTargetBar,
CPaneContainerManager& barContainerManager,
DWORD dwAlignment);
[in] barContainerManager
[in] bOuterEdge
[in] pTargetBar
[in] dwAlignment
virtual CDockablePane* AddRecentPane(CDockablePane* pBar);
[in] pBar
virtual void CalcExpectedDockedRect(
CWnd* pWndToDock,
CPoint ptMouse,
CRect& rectResult,
BOOL& bDrawTab,
CDockablePane** ppTargetBar);
[in] pWndToDock
[in] ptMouse
[in] rectResult
[in] bDrawTab
[in] ppTargetBar
virtual CSize CalcFixedLayout(
BOOL bStretch,
BOOL bHorz);
[in] bStretch
[in] bHorz
virtual BOOL CheckVisibility();
CPaneDivider();
CPaneDivider(
BOOL bDefaultSlider,
CWnd* pParent = NULL);
[in] bDefaultSlider
[in] pParent
virtual BOOL CreateEx(
DWORD dwStyleEx,
DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd,
UINT nID,
CCreateContext* pContext);
[in] dwStyleEx
[in] dwStyle
[in] rect
[in] pParentWnd
[in] nID
[in] pContext
virtual BOOL DoesAllowDynInsertBefore() const;
virtual BOOL DoesContainFloatingPane();
CPaneContainer* FindPaneContainer(
CDockablePane* pBar,
BOOL& bLeftBar);
[in] pBar
[in] bLeftBar
CDockablePane* FindTabbedPane(UINT nID);
[in] nID
static int __stdcall GetDefaultWidth();
const CBasePane* GetFirstPane() const;
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);
lstSliders
[out] Contains the list of pane dividers that reside in the pane container.
This method should be called for default pane dividers only. A default pane divider is a divider that resizes the entire pane container.
DWORD GetPaneDividerStyle() const;
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);
lstBars
[out] Contains the list of panes that reside in the pane container.
This method should be called for default pane dividers only. A default pane divider is a divider that resizes the entire pane container.
CRect GetRootContainerRect();
int GetWidth() const;
void Init(
BOOL bDefaultSlider = FALSE,
CWnd* pParent = NULL);
[in] bDefaultSlider
[in] pParent
virtual BOOL InsertPane(
CDockablePane* pBarToInsert,
CDockablePane* pTargetBar,
DWORD dwAlignment,
LPCRECT lpRect = NULL);
[in] pBarToInsert
[in] pTargetBar
[in] dwAlignment
[in] lpRect
BOOL IsAutoHideMode() const;
BOOL IsDefault() const;
BOOL IsHorizontal() const;
Specifies the default width, in pixels, of all pane dividers in the application.
AFX_IMPORT_DATA static int m_nDefaultWidth;
virtual void Move(
CPoint& ptOffset,
BOOL bAdjustLayout = TRUE);
[in] ptOffset
[in] bAdjustLayout
Holds a pointer to runtime class information about a CPaneDivider
-derived object.
AFX_IMPORT_DATA static CRuntimeClass* m_pSliderRTC;
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.
The following example shows how to set the m_pSliderRTC
member variable:
class CMySplitter : public CPaneDivider
{
...
};
CPaneDivider::m_pSliderRTC = RUNTIME_CLASS(CMySpliter);
virtual void NotifyAboutRelease();
virtual void OnShowPane(
CDockablePane* pBar,
BOOL bShow);
[in] pBar
[in] bShow
void ReleaseEmptyPaneContainers();
virtual void RemovePane(CDockablePane* pBar);
[in] pBar
virtual BOOL ReplacePane(
CDockablePane* pBarToReplace,
CDockablePane* pBarToReplaceWith);
[in] pBarToReplace
[in] pBarToReplaceWith
virtual void RepositionPanes(
CRect& rectNew,
HDWP& hdwp);
[in] rectNew
[in] hdwp
void Serialize(CArchive& ar);
[in] ar
void ShowWindow(int nCmdShow);
[in] nCmdShow
void StoreRecentDockSiteInfo(CDockablePane* pBar);
[in] pBar
void StoreRecentTabRelatedInfo(
CDockablePane* pDockingBar,
CDockablePane* pTabbedBar);
[in] pDockingBar
[in] pTabbedBar
Hierarchy Chart
Classes
CPaneContainerManager Class
CPaneContainer Class
CDockingManager Class
CBasePane Class