Freigeben über


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

CMFCRibbonStatusBarPane::CMFCRibbonStatusBarPane

Constructs and initializes a CMFCRibbonStatusBarPane object.

Public Methods

Name

Description

CMFCRibbonStatusBarPane::GetAlmostLargeText

Returns the string that defines the longest text string that can be displayed in the pane without truncation.

CMFCRibbonStatusBarPane::GetTextAlign

Returns the current setting of the text alignment.

CMFCRibbonStatusBarPane::IsAnimation

Determines whether the animation is in progress.

CMFCRibbonStatusBarPane::IsExtended

Determines whether the pane is located in the extended area of the ribbon status bar.

CMFCRibbonStatusBarPane::OnDrawBorder

  (Overrides CMFCRibbonButton::OnDrawBorder.)

CMFCRibbonStatusBarPane::OnFillBackground

  (Overrides CMFCRibbonButton::OnFillBackground.)

CMFCRibbonStatusBarPane::SetAlmostLargeText

Defines the longest text string that can be displayed in the pane without truncation.

CMFCRibbonStatusBarPane::SetAnimationList

Assigns to the pane an image list that can be used for animation.

CMFCRibbonStatusBarPane::SetTextAlign

Sets the text alignment.

CMFCRibbonStatusBarPane::StartAnimation

Starts the animation that is assigned to the pane.

CMFCRibbonStatusBarPane::StopAnimation

Stops the animation that is assigned to the pane. .

Protected Methods

Name

Description

CMFCRibbonStatusBarPane::OnFinishAnimation

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

CObject

   CMFCRibbonBaseElement

      CMFCRibbonButton

         CMFCRibbonStatusBarPane

Requirements

Header: afxribbonstatusbarpane.h

See Also

Reference

Hierarchy Chart

CMFCRibbonButton Class

CMFCRibbonStatusBar Class

Other Resources

MFC Classes