BCGControlBar Pro for MFC
CBCGPBaseRibbonElement* CBCGPRibbonBar::FindByData ( DWORD_PTR  dwData,
BOOL  bVisibleOnly = TRUE 
) const

Finds a ribbon element by associated user-defined data.

Returns
A valid pointer to ribbon element with specified user-defined data, or NULL, if element with specified data does not exist, or element is not visible and bVisibleOnly flag is TRUE.

Use this method to find a (first) ribbon element by associated user-defined data.

Parameters
dwDataSpecifies the data to find by.
bVisibleOnlyIf TRUE, the function will loop through visible items only.