Compartilhar via


CMFCRibbonPanel::ReplaceByID

Replaces one element with another based on a specified command ID.

BOOL ReplaceByID(
    UINT uiCmdID,
    CMFCRibbonBaseElement* pElem 
);

Parameters

  • [in] uiCmdID
    Specifies the command ID of the element to replace.

  • [in] [out] pElem
    A valid pointer to the element that will replace the original element.

Return Value

TRUE if the original ribbon element has been replaced successfully by the new ribbon element; FALSE if the ribbon element was not replaced or if no element with the specified command ID actually exists.

Remarks

To replace a ribbon element based on position, call CMFCRibbonPanel::Replace.

Requirements

Header: afxRibbonPanel.h

See Also

Reference

CMFCRibbonPanel Class

Hierarchy Chart