BCGControlBar Pro for MFC
BOOL CBCGPRibbonPanel::ReplaceByID ( UINT  uiCmdID,
CBCGPBaseRibbonElement pElem,
BOOL  bCopyContent = TRUE 

Replaces one element with another by command ID.

Nonzero if original element has been replaced successfully; otherwise 0. The function fails if there is no element with the specified command ID.

The function looks for an element by command ID and replaces it with pElem.

uiCmdIDA command ID of the element to be replaced.
pElemA valid pointer to element, which will replace the original element.
bCopyContentIf TRUE, the content of the previous element will be copied to the new.