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 |
---|---|
|
Public Methods
Name |
Description |
---|---|
|
|
(Overrides CPane::AllowShowOnPaneMenu.) |
|
(Overrides CBasePane::CalcFixedLayout.) |
|
Creates a control bar and attaches it to the CPane object. (Overrides CPane::Create.) |
|
|
|
|
|
Called by the framework when a special pane menu is about to be displayed. (Overrides CPane::OnShowControlBarMenu.) |
|
|
|
(Overrides CPane::SetActiveInGroup.) |
|
|
|
|
|
Stretches a pane vertically or horizontally. (Overrides CBasePane::StretchPane.) |
|
|
|
|
Data Members
Name |
Description |
---|---|
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
Requirements
Header: afxautohidebar.h