Compartilhar via


CMFCRibbonPanel::Insert

Inserts the specified ribbon element at the specified position in the array of ribbon elements that is contained in the ribbon panel.

virtual BOOL Insert(
    CMFCRibbonBaseElement* pElem,
    int nIndex 
);

Parameters

  • [in, out] pElem
    Pointer to a ribbon element.

  • [in] nIndex
    Zero-based value, ranging from -1 to the number of ribbon elements that are contained in the array.

Return Value

TRUE if the ribbon element was inserted successfully; otherwise FALSE.

Remarks

If the value of nIndex is -1, or if nIndex equals the number of ribbon elements in the array, the specified ribbon element is added to the end of the array. If the value of nIndex is out of range, the method will fail.

Requirements

Header: afxRibbonPanel.h

See Also

Reference

CMFCRibbonPanel Class

Hierarchy Chart