Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

CMFCRibbonBar::SetQuickAccessCommands

Adds one or more ribbon elements to the Quick Access Toolbar.

void SetQuickAccessCommands(
   const CList<UINT,UINT>& lstCommands,
   BOOL bRecalcLayout=TRUE 
);
[in] lstCommands

The list of commands to be placed on the Quick Access Toolbar.

[in] bRecalcLayout

TRUE if want to redraw the ribbon after you add the ribbon elements; FALSE otherwise.

Header: afxribbonbar.h

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

	// Add quick access commands to the toolbar
	CList<UINT, UINT> lstQATCmds;

	lstQATCmds.AddTail(ID_FILE_NEW);
	lstQATCmds.AddTail(ID_FILE_OPEN);
	lstQATCmds.AddTail(ID_FILE_SAVE);
	lstQATCmds.AddTail(ID_FILE_PRINT_DIRECT);

	// CMFCRibbonBar m_wndRibbonBar
	m_wndRibbonBar.SetQuickAccessCommands(lstQATCmds);
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.