Share via


CMFCRibbonGalleryMenuButton::CMFCRibbonGalleryMenuButton

Constructs and initializes a CMFCRibbonGalleryMenuButton object.

CMFCRibbonGalleryMenuButton(
    UINT uiID,
    int iImage,
    LPCTSTR lpszText,
    CMFCToolBarImages& imagesPalette);
CMFCRibbonGalleryMenuButton(
    UINT uiID,
    int iImage,
    LPCTSTR lpszText,
    UINT uiImagesPaletteResID = 0,
    int cxPaletteImage = 0);

Parameters

  • uiID
    The command ID of the button. This is the value sent in the WM_COMMAND message when the user clicks this button.

  • iImage
    The index of the image to display with the gallery menu button. The images are stored in the imagesPalette parameter.

  • lpszText
    The text to display on the menu button.

  • imagesPalette
    Contains the list of images to display on the gallery.

  • uiImagesPaletteResID
    The resource ID of the image list for the images to display on the gallery.

  • cxPaletteImage
    Specifies the width in pixels of the image to display on the gallery.

Remarks

The gallery menu button is displayed as a pop-up menu that has an arrow. When the user clicks this button, a gallery of images is displayed.

Example

The following example demonstrates how to use the constructor of the CMFCRibbonGalleryMenuButton class. This code snippet is part of the MS Office 2007 Demo sample.

        // CMFCToolBarButton pExButton
        CMFCRibbonGalleryMenuButton paletteBullet(pExButton->m_nID, pExButton->GetImage(), pExButton->m_strText);

Requirements

Header: afxRibbonPaletteGallery.h

See Also

Reference

CMFCRibbonGalleryMenuButton Class

Hierarchy Chart