![]()  | 
 
Custom icons on ribbon | 
 
    Post Reply  
   | 
  
| Author | |
   
   rconn  
   
   Groupie  
   Joined: 16 May 2007 Location: United States Status: Offline Points: 79  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Custom icons on ribbonPosted: 12 October 2013 at 9:52pm  | 
 
| 
   
    
   
Using 16.2.4 & VS2012 
   
  How can I assign an icon (or bitmap) to an individual control in a ribbon group? 
    | 
 |
![]()  | 
 |
   
   rconn  
   
   Groupie  
   Joined: 16 May 2007 Location: United States Status: Offline Points: 79  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 13 October 2013 at 12:02pm | 
 
| 
   
    
   
OK, I figured out how to get the icon onto an individual control. 
   
  But when I call the group add method and then add the icon, I always get the 16x16 icons and three rows in the group.  How can I specify that the group (or an individual control) should display as 1 row, 32x32 icon, and have the caption below it instead of to the right?  (Specifying a 32x32 icon doesn't do it; it just overwrites the caption displayed to the right). 
    | 
 |
![]()  | 
 |
   
   rconn  
   
   Groupie  
   Joined: 16 May 2007 Location: United States Status: Offline Points: 79  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 13 October 2013 at 4:49pm | 
 
| 
   
    
   
I found the "pControl->SetStyle( xtpButtonIconAndCaptionBelow)" method to put the caption below the icon.  But the icon still shows as 16x16; the SetIconSize() method doesn't affect it. 
   
  So, I can now do most of what I want, except I can't get the ribbon to use 32x32 icons when they're individually assigned. 
    | 
 |
![]()  | 
 |
   
   Alex H.  
   
   Senior Member  
   Joined: 12 February 2004 Status: Offline Points: 266  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 16 October 2013 at 3:02am | 
 
| 
   
    
   Hi! 
   
  I have used a special PNG containing alls 32*32 pictures. pCommandBars->GetImageManager()->SetIcons(IDB_PNG_RIBBON_LARGE, uiLargeIcons, _countof(uiLargeIcons), CSize(32, 32)); This worked for me.  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |