CMFCRibbonStatusBar Class

The CMFCRibbonStatusBar class implements a status bar control that can display ribbon elements.

class CMFCRibbonStatusBar : public CMFCRibbonBar

Members

Public Methods

Name

Description

CMFCRibbonStatusBar::AddDynamicElement

Adds a dynamic element to the ribbon status bar.

CMFCRibbonStatusBar::AddElement

Adds a new ribbon element to the ribbon status bar.

CMFCRibbonStatusBar::AddExtendedElement

Adds a ribbon element to the extended area of the ribbon status bar.

CMFCRibbonStatusBar::AddSeparator

Adds a separator to the ribbon status bar.

CMFCRibbonStatusBar::Create

Creates a ribbon status bar.

CMFCRibbonStatusBar::CreateEx

Creates a ribbon status bar with an extended style.

CMFCRibbonStatusBar::FindByID

 

CMFCRibbonStatusBar::FindElement

Returns a pointer to the element that has the specified command ID.

CMFCRibbonStatusBar::GetCount

Returns the number of elements that are located in the main area of the ribbon status bar.

CMFCRibbonStatusBar::GetElement

Returns a pointer to the element that is located at a specified index.

CMFCRibbonStatusBar::GetExCount

Returns the number of elements that are located in the extended area of the ribbon status bar.

CMFCRibbonStatusBar::GetExElement

Returns a pointer to the element that is located at a specified index in the extended area of the ribbon status bar.

CMFCRibbonStatusBar::GetExtendedArea

 

CMFCRibbonStatusBar::GetSpace

 

CMFCRibbonStatusBar::IsBottomFrame

 

CMFCRibbonStatusBar::IsExtendedElement

 

CMFCRibbonStatusBar::IsInformationMode

Determines whether information mode is enabled for the ribbon status bar.

CMFCRibbonStatusBar::RecalcLayout

  (Overrides CMFCRibbonBar::RecalcLayout.)

CMFCRibbonStatusBar::RemoveAll

Removes all elements from the ribbon status bar.

CMFCRibbonStatusBar::RemoveElement

Removes the element that has a specified command ID from the ribbon status bar.

CMFCRibbonStatusBar::SetInformation

Enables or disables the information mode for the ribbon status bar.

Protected Methods

Name

Description

CMFCRibbonStatusBar::OnDrawInformation

Displays the information string that appears on the ribbon status bar when the information mode is enabled.

Remarks

Users can change the visibility of ribbon elements on a ribbon status bar by using the built-in context menu for the ribbon status bar. You can add or remove elements dynamically.

A ribbon status bar has two areas: a main area and an extended area. The extended area is displayed on the right side of the ribbon status bar and appears in a different color than the main area does.

Typically, the main area of the status bar displays status notifications, and the extended area displays view controls. The extended area remains visible as long as possible when the user resizes the ribbon status bar.

Example

The following example demonstrates how to use various methods in the CMFCRibbonStatusBar class. The example shows how to add a new ribbon element to the ribbon status bar, add a ribbon element to the extended area of the ribbon status bar, add a separator, and enable the regular mode for the ribbon status bar.

    // CMFCRibbonStatusBar  m_wndStatusBar
    m_wndStatusBar.AddElement(rsbp, strTitlePane1);
    m_wndStatusBar.AddExtendedElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE2, strTitlePane2, TRUE), 
        strTitlePane2);


...


    m_wndStatusBar.AddSeparator();
    m_wndStatusBar.SetInformation(NULL);

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CBasePane

            CPane

               CMFCRibbonBar

                  CMFCRibbonStatusBar

Requirements

Header: afxribbonstatusbar.h

See Also

Reference

Hierarchy Chart

CMFCRibbonBar Class

CMFCRibbonBaseElement Class

CMFCRibbonBar Class

Other Resources

MFC Classes