Click here to Skip to main content
15,921,169 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i created a MFC application and in the wizard i chase office ribbon style

i open the ribbon designer tool and add a button to the ribbon. i want to add an image to the button so in the properties dialog i click 'Image Index' and i get a popup "Image collection" with 8 or so built in images with stuff like scissors, etc.

i want to add my own images to that collection so i can make my buttons more interesting but i have no idea how. please help, how do i add an image to the image collection?

thanks

UPDATE

i found that the images for the ribbon buttons are saved in res/writesmall.bmp

i am able extent the bmp file (in photoshop) by say 16 pixels with a black background and edit an image in the new space, then save it. then i force a rebuild in vs2010 and open the ribbon designer and when i click on a button and choose image index i see there is a box for a new image, number 9, BUT the picture i drew on the image is missing, the image icon is blank.

so i select it anyhow and compile and run, and at run time its the same thing!

by the way, i am able to edit the first 8 images in photoshop and i can see the edits taking place, so for some reason, the ribbon system is ignoring the contents of the extra image but is recognizing the size of the image .bmp file
Posted
Updated 26-May-11 1:26am
v3

it seems that editing res/writesmall.bmp has some very strange side effects in vs2010, it causes it to run very slowly. normally when i hit F5 to start debugging it takes a second or less, now it's taking about 1 minute.

anyhow, i was able to fix it be renaming my project folder, restarting vs2010 and forcing it to rescan and rebuild, vs ran ok. then i changed the name back to the original name, restarted vs and it seems to work ok now.

also, i found what was going on with the bit maps in writesmall.bmp. in photoshop i open the channel pallet and look at alpha and there is the answer, i need to set alpha as well as RGB w\then it displays fine


its strange that microsoft don't provide any info about associating images with buttons on the ribbon bar!
 
Share this answer
 
v3
download .net advantage from the infragistics.com and where you can get tools xamRibben .
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900