BCGControlBar Pro for MFC
void CBCGPRibbonPaletteButton::SetPalette ( UINT  uiImagesPaletteResID,
int  cxPaletteImage,
UINT  uiImagesPaletteSimplifiedResID = 0,
int  cxPaletteImageSimplified = 0 
)

Attaches a palette (gallery) to the ribbon palette button.

Use this method to attach a gallery to the button on the fly.

Parameters
uiImagesPaletteResIDResource ID of an image list with palette (gallery) icons.
cxPaletteImageSpecifies the width of a palette (gallery) image.
uiImagesPaletteSimplifiedResIDSpecifies a resource ID of an image list, which contains images for the group. This image list will be displayed in the Ribbon simplified mode only.
cxPaletteImageSimplifiedSpecifies the width of an image (simplified mode).