CMFCRibbonStatusBar Class
The CMFCRibbonStatusBar class implements a status bar control that can display ribbon elements.
class CMFCRibbonStatusBar : public CMFCRibbonBar
Members
Public Methods
Name |
Description |
---|---|
Adds a dynamic element to the ribbon status bar. |
|
Adds a new ribbon element to the ribbon status bar. |
|
Adds a ribbon element to the extended area of the ribbon status bar. |
|
Adds a separator to the ribbon status bar. |
|
Creates a ribbon status bar. |
|
Creates a ribbon status bar with an extended style. |
|
|
|
Returns a pointer to the element that has the specified command ID. |
|
Returns the number of elements that are located in the main area of the ribbon status bar. |
|
Returns a pointer to the element that is located at a specified index. |
|
Returns the number of elements that are located in the extended area of the ribbon status bar. |
|
Returns a pointer to the element that is located at a specified index in the extended area of the ribbon status bar. |
|
|
|
|
|
|
|
|
|
Determines whether information mode is enabled for the ribbon status bar. |
|
(Overrides CMFCRibbonBar::RecalcLayout.) |
|
Removes all elements from the ribbon status bar. |
|
Removes the element that has a specified command ID from the ribbon status bar. |
|
Enables or disables the information mode for the ribbon status bar. |
Protected Methods
Name |
Description |
---|---|
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
Requirements
Header: afxribbonstatusbar.h