Dela via


CAutoHideDockSite Class

The CAutoHideDockSite extends the CDockSite Class to implement auto-hide dock panes.

class CAutoHideDockSite : public CDockSite

Members

Public Constructors

Name

Description

CAutoHideDockSite::CAutoHideDockSite

Constructs a CAutoHideDockSite object.

CAutoHideDockSite::~CAutoHideDockSite

Destructor.

Public Methods

Name

Description

CAutoHideDockSite::AllowShowOnPaneMenu

Indicates whether the CAutoHideDockSite is shown on the pane menu.

CAutoHideDockSite::CanAcceptPane

Determines whether a base pane object is derived from the CMFCAutoHideBar Class.

CAutoHideDockSite::DockPane

Docks a pane to this CAuotHideDockSite object.

CAutoHideDockSite::GetAlignRect

Retrieves the size of the dock site in screen coordinates.

CAutoHideDockSite::RepositionPanes

Redraws the pane on the CAutoHideDockSite with the global margins and button spacing.

CAutoHideDockSite::SetOffsetLeft

Sets the margin on the left side of the docking bar.

CAutoHideDockSite::SetOffsetRight

Sets the margin on the right side of the docking bar.

CAutoHideDockSite::UnSetAutoHideMode

Calls CMFCAutoHideBar::UnSetAutoHideMode for objects on the CAutoHideDockSite.

Data Members

Name

Description

CAutoHideDockSite::m_nExtraSpace

Defines the size of the space between the toolbars and the edge of the docking bar. This space is measured from either the left edge or the top edge, depending on the alignment for the dock space.

Remarks

When you call CFrameWndEx::EnableAutoHidePanes, the framework automatically creates a CAutoHideDockSite object. In most cases, you should not have to instantiate or use this class directly.

The docking bar is the gap between the left side of the dock pane and the left side of the CMFCAutoHideButton Class.

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CBasePane

            CDockSite

Example

The following example demonstrates how to retrieve a CAutoHideDockSite object from a CMFCAutoHideBar object, and how to set the left and right margins of the docking bar.

  CAutoHideDockSite* pParentDockBar = DYNAMIC_DOWNCAST(CAutoHideDockSite, pParentBar->GetParentDockSite());
    pParentDockBar->SetOffsetLeft(10);
    pParentDockBar->SetOffsetRight(10);

Requirements

Header: afxautohidedocksite.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CDockSite Class

Other Resources

Classes (MFC Feature Pack)