BCGControlBar Pro for MFC
BOOL CBCGPRibbonPanel::Replace ( int  nIndex,
CBCGPBaseRibbonElement pElem,
BOOL  bCopyContent = TRUE 
)

Replaces one element with another by index.

Returns
Nonzero if original element has been replaced successfully; otherwise 0. The function fails if there is no element exists at the specified index.

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

Parameters
nIndexZero-based index 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.