CMFCAutoHideButton Class

A button that displays or hides a CDockablePane Class that is configured to hide.

class CMFCAutoHideButton : public CObject

Members

Public Methods

Name

Description

CMFCAutoHideButton::BringToTop

 

CMFCAutoHideButton::Create

Creates and initializes the auto-hide button.

CMFCAutoHideButton::GetAlignment

Retrieves the alignment of the auto-hide button.

CMFCAutoHideButton::GetAutoHideWindow

Returns the CDockablePane object associated with the auto-hide button.

CMFCAutoHideButton::GetParentToolBar

 

CMFCAutoHideButton::GetRect

 

CMFCAutoHideButton::GetSize

Determines the size of the auto-hide button.

CMFCAutoHideButton::GetTextSize

Returns the size of the text label for the auto-hide button.

CMFCAutoHideButton::HighlightButton

Highlights auto hide button.

CMFCAutoHideButton::IsActive

Indicates whether the auto-hide button is active.

CMFCAutoHideButton::IsHighlighted

Returns highlight state of auto hide button.

CMFCAutoHideButton::IsHorizontal

Determines whether the auto-hide button is horizontal or vertical.

CMFCAutoHideButton::IsTop

 

CMFCAutoHideButton::IsVisible

Indicates whether the button is visible.

CMFCAutoHideButton::Move

 

CMFCAutoHideButton::OnDraw

The framework calls this method when it draws the auto-hide button.

CMFCAutoHideButton::OnDrawBorder

The framework calls this method when it draws the border of an auto-hide button.

CMFCAutoHideButton::OnFillBackground

The framework calls this method when it fills the background of an auto-hide button.

CMFCAutoHideButton::ReplacePane

 

CMFCAutoHideButton::ShowAttachedWindow

Shows or hides the associated CDockablePane Class.

CMFCAutoHideButton::ShowButton

Shows or hides the auto-hide button.

CMFCAutoHideButton::UnSetAutoHideMode

 

Remarks

On creation, the CMFCAutoHideButton object is attached to a CDockablePane Class. The CDockablePane object is hidden or displayed as the user interacts with the CMFCAutoHideButton object.

By default, the framework automatically creates a CMFCAutoHideButton when the user turns on auto-hide. The framework can create an element of a custom UI class instead of the CMFCAutoHideButton class. To specify which custom UI class the framework should use, set the static member variable CMFCAutoHideBar::m_pAutoHideButtonRTS equal to the custom UI class. By default, this variable is set to CMFCAutoHideButton.

Example

The following example demonstrates how to construct a CMFCAutoHideButton object and use various methods in the CMFCAutoHideButton class. The example shows how to initialize a CMFCAutoHideButton object by using its Create method, show the associated CDockablePane class, and show the auto-hide button.

  CMFCAutoHideButton* autoHideButton = new CMFCAutoHideButton();
    CDockablePane cPane;
    // CMFCAutoHideBar* pParentBar 
    if ( !autoHideButton->Create(pParentBar, &cPane, CBRS_ALIGN_LEFT) )
    {
        return 0;
    }
    autoHideButton->ShowAttachedWindow(true);
    autoHideButton->ShowButton(true);

Inheritance Hierarchy

CObject

   CMFCAutoHideButton

Requirements

Header: afxautohidebutton.h

See Also

Reference

Hierarchy Chart

CMFCAutoHideBar Class

CAutoHideDockSite Class

Other Resources

MFC Classes