Partager via


CMFCAutoHideBar Class

The CMFCAutoHideBar class is a special toolbar class that implements the auto-hide feature.

class CMFCAutoHideBar : public CPane

Members

Public Constructors

Name

Description

CMFCAutoHideBar::CMFCAutoHideBar

 

Public Methods

Name

Description

CMFCAutoHideBar::AddAutoHideWindow

 

CMFCAutoHideBar::AllowShowOnPaneMenu

  (Overrides CPane::AllowShowOnPaneMenu.)

CMFCAutoHideBar::CalcFixedLayout

  (Overrides CBasePane::CalcFixedLayout.)

CMFCAutoHideBar::Create

Creates a control bar and attaches it to the CPane object. (Overrides CPane::Create.)

CMFCAutoHideBar::GetFirstAHWindow

 

CMFCAutoHideBar::GetVisibleCount

 

CMFCAutoHideBar::OnShowControlBarMenu

Called by the framework when a special pane menu is about to be displayed. (Overrides CPane::OnShowControlBarMenu.)

CMFCAutoHideBar::RemoveAutoHideWindow

 

CMFCAutoHideBar::SetActiveInGroup

  (Overrides CPane::SetActiveInGroup.)

CMFCAutoHideBar::SetRecentVisibleState

 

CMFCAutoHideBar::ShowAutoHideWindow

 

CMFCAutoHideBar::StretchPane

Stretches a pane vertically or horizontally. (Overrides CBasePane::StretchPane.)

CMFCAutoHideBar::UnSetAutoHideMode

 

CMFCAutoHideBar::UpdateVisibleState

 

Data Members

Name

Description

CMFCAutoHideBar::m_nShowAHWndDelay

The time delay between the moment when the user places the mouse cursor over a CMFCAutoHideButton Class and the moment when the framework shows the associated window.

Remarks

When the user switches a dock pane to auto-hide mode, the framework automatically creates a CMFCAutoHideBar object. It also creates the necessary CAutoHideDockSite and CMFCAutoHideButton objects. Each CAutoHideDockSite object is associated with an individual CMFCAutoHideButton.

The CMFCAutoHideBar class implements the display of a CAutoHideDockSite when a user's mouse hovers over a CMFCAutoHideButton. When the toolbar receives a WM_MOUSEMOVE message, CMFCAutoHideBar starts a timer. When the timer finishes, it sends the toolbar a WM_TIMER event notification. The toolbar handles this event by checking whether the mouse pointer is positioned over the same auto-hide button that it was positioned over when the timer started. If it is, the attached CAutoHideDockSite is displayed.

You can control the length of the timer's delay by setting m_nShowAHWndDelay. The default value is 400 ms.

Example

The following example demonstrates how to construct a CMFCAutoHideBar object and use its GetDockSiteRow method.

    CMFCAutoHideBar* pParentBar = new CMFCAutoHideBar();
    CDockingPanesRow* pParentRow = pParentBar->GetDockSiteRow();

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CBasePane

            CPane

               CMFCAutoHideBar

Requirements

Header: afxautohidebar.h

See Also

Reference

Hierarchy Chart

CPane Class

CAutoHideDockSite Class

CMFCAutoHideButton Class

Other Resources

MFC Classes