BCGControlBar Pro for MFC
CBCGPBaseRibbonElement* CBCGPRibbonPanel::SetElementRTC ( int  nIndex,
CRuntimeClass *  pRTC 
)

Specifies a runtime class of element located at the given position.

Returns
A pointer to custom element, created using the specified runtime class information.

Ribbon Control creates and copies elements on the fly. If you need to add a custom element (for example, a color button), you need to specify the custom element's runtime class info. Ribbon Control will store this information and create the custom element at the specified location. Then it returns a pointer to the newly created element and you can set it up immediately.

Parameters
nIndexSpecifies the index of custom element.
pRTCA pointer to runtime class information of the custom element.