CMFCRibbonBar::FindByID
Retrieves a pointer to the ribbon element that has the specified command ID and search values.
CMFCRibbonBaseElement* FindByID(
UINT uiCmdID,
BOOL bVisibleOnly = TRUE,
BOOL bExcludeQAT = FALSE
) const;
Parameters
[in] uiCmdID
Command ID for a ribbon element.[in] bVisibleOnly
TRUE to search visible ribbon elements only; FALSE to search all ribbon elements.[in] bExcludeQAT
TRUE to exclude quick access toolbar elements from the search; otherwise, FALSE.
Return Value
A pointer to a ribbon element if it has the specified command ID and search values; otherwise, NULL.
Remarks
A ribbon element is any ribbon control that can be added to the ribbon, such as a ribbon button, or a ribbon category, or a ribbon slider.
In general, there can be more than one ribbon element that has the same command ID. If you want to obtain pointers to all ribbon elements that use a specified command ID, use the CMFCRibbonBar::GetElementsByID method.
Requirements
Header: afxribbonbar.h