2
votes

I created with Visual C++ 2010 a MFC application with ribbon. I have added buttons to this ribbon, but I do not know how to add images to these buttons. I tried editing writelarge.bmp file from the project, and setting the index of image on these buttons, but now the ribbon icons looks very ugly. Is there an easy way to add icons to ribbon images, other than editing writelarge.bmp file from the project?

1

1 Answers

3
votes

You have the possibility to use only one file for each RibbonCategory.

  1. Create your png file (32x256 for instance)

  2. Add the file like a resource

  3. Always in the Resource View, select your RibbonCategory and set the "Large Images" property to your PNG resource identifier (like IDB_MYMENU_PNG).

I also have many issues using bmp format (image not visible, transparency deleted, ...) that's why I recommand the png format.

In order to use original and custom images in the same category, I created a png file which is a merge of both.