Export (0) Print
Expand All
Expand Minimize

CMFCRibbonBar::SetApplicationButton

Assigns an application ribbon button to the ribbon bar.

void SetApplicationButton(
   CMFCRibbonApplicationButton* pButton,
   CSize sizeButton 
);

[in] pButton

A pointer to the application ribbon button.

[in] sizeButton

The size of the application ribbon button.

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

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));

Header: afxribbonbar.h

Show:
© 2014 Microsoft