Поделиться через


CMFCRibbonBar::SetApplicationButton

Assigns an application ribbon button to the ribbon bar.

void SetApplicationButton(
   CMFCRibbonApplicationButton* pButton,
   CSize sizeButton 
);

Parameters

  • [in] pButton
    A pointer to the application ribbon button.

  • [in] sizeButton
    The size of the application ribbon button.

Remarks

The application ribbon button is a large rounded button located at the upper-left corner of Ribbon control.

Example

The following example demonstrates how to use the SetApplicationButton method in the CMFCRibbonBar class.

// Init main button: 
    // CMFCRibbonApplicationButton m_MainButton
    m_MainButton.SetImage(IDB_MAIN);
    m_MainButton.SetText(_T("\nf"));
    m_MainButton.SetToolTipText(strTemp);

    // CMFCRibbonBar m_wndRibbonBar
    m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize (45, 45));

Requirements

Header: afxribbonbar.h

See Also

Reference

CMFCRibbonBar Class

Hierarchy Chart