CMFCRibbonStatusBarPane Class
The CMFCRibbonStatusBarPane class implements a ribbon element that you can add to a ribbon status bar.
class CMFCRibbonStatusBarPane : public CMFCRibbonButton
Members
Public Constructors
Name |
Description |
---|---|
Constructs and initializes a CMFCRibbonStatusBarPane object. |
Public Methods
Name |
Description |
---|---|
Returns the string that defines the longest text string that can be displayed in the pane without truncation. |
|
Returns the current setting of the text alignment. |
|
Determines whether the animation is in progress. |
|
Determines whether the pane is located in the extended area of the ribbon status bar. |
|
(Overrides CMFCRibbonButton::OnDrawBorder.) |
|
(Overrides CMFCRibbonButton::OnFillBackground.) |
|
Defines the longest text string that can be displayed in the pane without truncation. |
|
Assigns to the pane an image list that can be used for animation. |
|
Sets the text alignment. |
|
Starts the animation that is assigned to the pane. |
|
Stops the animation that is assigned to the pane. . |
Protected Methods
Name |
Description |
---|---|
Called by the framework when the animation that is assigned to the pane stops. |
Example
The following example demonstrates how to use the various methods in the CMFCRibbonStatusBarPane class. The example shows how to construct a CMFCRibbonStatusBarPane object, set the text alignment of the label of the status bar pane, define the longest text that can be displayed in the status bar pane without truncation, attach to the status bar pane an image list that can be used for animation, and start the animation.
CString strTitlePane1;
CString strTitlePane2;
strTitlePane1.LoadString(IDS_STATUS_PANE1);
strTitlePane2.LoadString(IDS_STATUS_PANE2);
CMFCRibbonStatusBarPane* rsbp = new CMFCRibbonStatusBarPane( ID_STATUSBAR_PANE1, strTitlePane1, TRUE );
rsbp->SetTextAlign( TA_CENTER );
rsbp->SetAlmostLargeText( _T( "Status bar" ) );
CBitmap bitmap;
bitmap.LoadBitmapW( IDB_FILESMALL );
rsbp->SetAnimationList( (HBITMAP)bitmap );
rsbp->StartAnimation();
Inheritance Hierarchy
Requirements
Header: afxribbonstatusbarpane.h