Share via


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

INCLUDEcpp_fp_under_construction]

Provides functionality for arranging panes that are derived from the CPane Class into sets of rows.

Syntax

class CDockSite: public CBasePane  

Members

Public Methods

Name Description
CDockSite::AddRow
CDockSite::AdjustDockingLayout (Overrides CBasePane::AdjustDockingLayout.)
CDockSite::AdjustLayout (Overrides CBasePane::AdjustLayout.)
CDockSite::AlignDockSite
CDockSite::CalcFixedLayout (Overrides CBasePane::CalcFixedLayout.)
CDockSite::CanAcceptPane (Overrides CBasePane::CanAcceptPane.)
CDockSite::CreateEx (Overrides CBasePane::CreateEx.)
CDockSite::CreateRow
CDockSite::DockPane (Overrides CBasePane::DockPane.)
CDockSite::DoesAllowDynInsertBefore (Overrides CBasePane::DoesAllowDynInsertBefore.)
CDockSite::FindRowIndex
CDockSite::FixupVirtualRects
CDockSite::GetDockSiteID
CDockSite::GetDockSiteRowsList
CDockSite::IsAccessibilityCompatible (Overrides CBasePane::IsAccessibilityCompatible.)
CDockSite::IsDragMode
CDockSite::IsLastRow
CDockSite::IsRectWithinDockSite
CDockSite::IsResizable (Overrides CBasePane::IsResizable.)
CDockSite::MovePane
CDockSite::OnInsertRow
CDockSite::OnRemoveRow
CDockSite::OnResizeRow
CDockSite::OnSetWindowPos
CDockSite::OnShowRow
CDockSite::OnSizeParent
CDockSite::PaneFromPoint Returns a pane that is docked in the dock site at the point specified by the given parameter.
CDockSite::DockPaneLeftOf Docks a pane to the left of another pane.
CDockSite::FindPaneByID Returns the pane that is identified by the given ID.
CDockSite::GetPaneList Returns a list of panes that are docked at the dock site.
CDockSite::RectSideFromPoint
CDockSite::RemovePane
CDockSite::RemoveRow
CDockSite::ReplacePane
CDockSite::RepositionPanes
CDockSite::ResizeDockSite
CDockSite::ResizeRow
CDockSite::ShowPane Shows the pane.
CDockSite::ShowRow
CDockSite::SwapRows

Remarks

The framework creates CDockSite objects automatically when you call CFrameWndEx::EnableDocking. Dock site windows are positioned at the edge of the client area on the main frame window.

You usually do not have to call the services provided by the dock site because CFrameWndEx Class handles these services.

Example

The following example demonstrates how to create an object of the CDockSite class.

   AFX_DOCKSITE_INFO info;
    CDockSite* pDockBar = (CDockSite*) info.pDockBarRTC->CreateObject();

Inheritance Hierarchy

CObject CCmdTarget CWnd

CBasePane CDockSite

Requirements

Header: afxDockSite.h

CDockSite::AddRow

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.

CDockingPanesRow* AddRow(
    POSITION pos,  
    int nHeight);

Parameters

[in] pos
[in] nHeight

Return Value

Remarks

CDockSite::AdjustDockingLayout

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

Remarks

CDockSite::AdjustLayout

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

Remarks

CDockSite::AlignDockSite

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 AlignDockSite(
    const CRect& rectToAlignBy,  
    CRect& rectResult,  
    BOOL bMoveImmediately);

Parameters

[in] rectToAlignBy
[in] rectResult
[in] bMoveImmediately

Remarks

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

CDockSite::CanAcceptPane

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

Parameters

[in] pBar

Return Value

Remarks

CDockSite::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,  
    DWORD dwControlBarStyle,  
    CCreateContext* pContext = NULL);

Parameters

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

Return Value

Remarks

CDockSite::CreateRow

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 CDockingPanesRow* CreateRow(
    CDockSite* pParentDockBar,  
    int nOffset,  
    int nRowHeight);

Parameters

[in] pParentDockBar
[in] nOffset
[in] nRowHeight

Return Value

Remarks

CDockSite::DockPane

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 DockPane(
    CPane* pWnd,  
    AFX_DOCK_METHOD dockMethod,  
    LPCRECT lpRect = NULL);

Parameters

[in] pWnd
[in] dockMethod
[in] lpRect

Remarks

CDockSite::DockPaneLeftOf

Docks a pane to the left of another pane.

virtual BOOL DockPaneLeftOf(
    CPane* pBarToDock,  
    CPane* pTargetBar);

Parameters

[in] [out] pBarToDock
A pointer to the pane to be docked to the left of pTargetBar.

[in] [out] pTargetBar
A pointer to the target pane.

Return Value

TRUE if the pane is docked successfully; otherwise, FALSE.

Remarks

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

CDockSite::FindPaneByID

Returns the pane with the given ID.

CPane* FindPaneByID(UINT nID);

Parameters

[in] nID
The command ID of the pane to be found.

Return Value

A pointer to the pane with the specified command ID, or NULL if the pane is not found.

Remarks

CDockSite::FindRowIndex

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 FindRowIndex(CDockingPanesRow* pRow);

Parameters

[in] pRow

Return Value

Remarks

CDockSite::FixupVirtualRects

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

Remarks

CDockSite::GetDockSiteID

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

Return Value

Remarks

CDockSite::GetDockSiteRowsList

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 CObList& GetDockSiteRowsList() const;  

Return Value

Remarks

CDockSite::GetPaneList

Returns a list of panes that are docked in the dock site.

const CObList& GetPaneList() const;  

Return Value

A read-only reference to the list of panes currently docked in the docking bar.

CDockSite::IsAccessibilityCompatible

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

Return Value

Remarks

CDockSite::IsDragMode

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

Return Value

Remarks

CDockSite::IsLastRow

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 IsLastRow(CDockingPanesRow* pRow) const;  

Parameters

[in] pRow

Return Value

Remarks

CDockSite::IsRectWithinDockSite

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 IsRectWithinDockSite(
    CRect rect,  
    CPoint& ptDelta);

Parameters

[in] rect
[in] ptDelta

Return Value

Remarks

CDockSite::IsResizable

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

Return Value

Remarks

CDockSite::MovePane

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 MovePane(
    CPane* pWnd,  
    UINT nFlags,  
    CPoint ptOffset);

Parameters

[in] pWnd
[in] nFlags
[in] ptOffset

Return Value

Remarks

CDockSite::OnInsertRow

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 OnInsertRow(POSITION pos);

Parameters

[in] pos

Remarks

CDockSite::OnRemoveRow

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 OnRemoveRow(
    POSITION pos,  
    BOOL bByShow = FALSE);

Parameters

[in] pos
[in] bByShow

Remarks

CDockSite::OnResizeRow

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 int OnResizeRow(
    CDockingPanesRow* pRowToResize,  
    int nOffset);

Parameters

[in] pRowToResize
[in] nOffset

Return Value

Remarks

CDockSite::OnSizeParent

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 OnSizeParent(
    CRect& rectAvailable,  
    UINT nSide,  
    BOOL bExpand,  
    int nOffset);

Parameters

[in] rectAvailable
[in] nSide
[in] bExpand
[in] nOffset

Remarks

CDockSite::OnSetWindowPos

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 OnSetWindowPos(
    const CWnd* pWndInsertAfter,  
    const CRect& rectWnd,  
    UINT nFlags);

Parameters

[in] pWndInsertAfter
[in] rectWnd
[in] nFlags

Return Value

Remarks

CDockSite::OnShowRow

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 OnShowRow(
    POSITION pos,  
    BOOL bShow);

Parameters

[in] pos
[in] bShow

Remarks

CDockSite::PaneFromPoint

Returns a pane that is docked in the dock site at the point specified by the given parameter.

virtual CPane* PaneFromPoint(CPoint pt);

Parameters

[in] pt
A point, in screen coordinates, for the pane to retrieve.

Return Value

A pointer to the pane located at the specified point or NULL if no pane was present at the specified point.

Remarks

CDockSite::RectSideFromPoint

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 RectSideFromPoint(
    const CRect& rect,  
    const CPoint& point);

Parameters

[in] rect
[in] point

Return Value

Remarks

CDockSite::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(
    CPane* pWnd,  
    AFX_DOCK_METHOD dockMethod);

Parameters

[in] pWnd
[in] dockMethod

Remarks

CDockSite::RemoveRow

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 RemoveRow(CDockingPanesRow* pRow);

Parameters

[in] pRow

Remarks

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

BOOL ReplacePane(
    CPane* pOldBar,  
    CPane* pNewBar);

Parameters

[in] pOldBar
[in] pNewBar

Return Value

Remarks

CDockSite::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& rectNewClientArea);

Parameters

[in] rectNewClientArea

Remarks

CDockSite::ResizeDockSite

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 ResizeDockSite(
    int nNewWidth,  
    int nNewHeight);

Parameters

[in] nNewWidth
[in] nNewHeight

Remarks

CDockSite::ResizeRow

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 ResizeRow(
    CDockingPanesRow* pRow,  
    int nNewSize,  
    BOOL bAdjustLayout = TRUE);

Parameters

[in] pRow
[in] nNewSize
[in] bAdjustLayout

Return Value

Remarks

CDockSite::ShowPane

Shows the pane.

virtual BOOL ShowPane(
    CBasePane* pBar,  
    BOOL bShow,  
    BOOL bDelay,  
    BOOL bActivate);

Parameters

[in] [out] pBar
A pointer to the pane to be shown or hidden.

[in] bShow
TRUE to specify that the pane is to be shown; FALSE to specify that the pane is to be hidden.

[in] bDelay
TRUE to specify that the layout of the pane should be delayed until after the pane is shown; otherwise, FALSE.

[in] bActivate
This parameter is not used.

Return Value

TRUE if the pane was shown or hidden successfully. FALSE if the specified pane does not belong to this dock site.

Remarks

Call this method to show or hide docked panes. Normally, you do not have to call CDockSite::ShowPane directly, because it is called by the parent frame window or by the base pane.

CDockSite::ShowRow

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 ShowRow(
    CDockingPanesRow* pRow,  
    BOOL bShow,  
    BOOL bAdjustLayout);

Parameters

[in] pRow
[in] bShow
[in] bAdjustLayout

Remarks

CDockSite::SwapRows

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 SwapRows(
    CDockingPanesRow* pFirstRow,  
    CDockingPanesRow* pSecondRow);

Parameters

[in] pFirstRow
[in] pSecondRow

Remarks

See Also

Hierarchy Chart
Classes
CBasePane Class