Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Custom icons on ribbon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom icons on ribbon

 Post Reply Post Reply
Author
Message
rconn View Drop Down
Groupie
Groupie


Joined: 16 May 2007
Location: United States
Status: Offline
Points: 77
Post Options Post Options   Thanks (0) Thanks(0)   Quote rconn Quote  Post ReplyReply Direct Link To This Post Topic: Custom icons on ribbon
    Posted: 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?
Back to Top
rconn View Drop Down
Groupie
Groupie


Joined: 16 May 2007
Location: United States
Status: Offline
Points: 77
Post Options Post Options   Thanks (0) Thanks(0)   Quote rconn Quote  Post ReplyReply Direct Link To This Post 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).
Back to Top
rconn View Drop Down
Groupie
Groupie


Joined: 16 May 2007
Location: United States
Status: Offline
Points: 77
Post Options Post Options   Thanks (0) Thanks(0)   Quote rconn Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.