Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - RIBBON Query: to support 24*22 size bitmap
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

RIBBON Query: to support 24*22 size bitmap

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


Joined: 17 November 2009
Location: India
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote archies Quote  Post ReplyReply Direct Link To This Post Topic: RIBBON Query: to support 24*22 size bitmap
    Posted: 02 December 2010 at 6:34am
Hi All;

This query is regarding the RIBBON behaviour with images.
by default RIBBON takes
16*16 bmp for small image
32*32 bmp for large image

i need to use the 24*22 (width*height) bmp image in RIBBON , it gets blurred .

I can't made all my image to 32*32.
Please tell me the procedure , by which i add the image (24*22) size without blur

thnx in advance
Back to Top
archies View Drop Down
Groupie
Groupie


Joined: 17 November 2009
Location: India
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote archies Quote  Post ReplyReply Direct Link To This Post Posted: 03 December 2010 at 1:48am
Hi ;
Let me make my problem short and more understandable.

In my application:-
CXTPRibbon having CXTPControl button.
CXTPControl having style "xtpButtonIconAndCaptionBelow".
It will make the CXTPControl icon as (32*32) size and put the Caption below this.

*I am using (24*22) bitmap : hence they stretch in 32*32 size and get blurred.
How can i use (24*22) bitmap ? Either its possible ?

SetIconSize - not working.
XTPPaintmanager and XTPImagemanager can't help me out.

thnx
Back to Top
Daelen View Drop Down
Newbie
Newbie


Joined: 09 December 2010
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Daelen Quote  Post ReplyReply Direct Link To This Post Posted: 09 December 2010 at 1:59pm
Hi there. I experienced the problem just like yours except for my icons have a size of 36x36. This helped me:
    CommandBars.Options.SetIconSize True, 36, 36
    CommandBars.Options.LargeIcons = True

And in yours case:
    CommandBars.Options.SetIconSize True, 24, 22


Back to Top
archies View Drop Down
Groupie
Groupie


Joined: 17 November 2009
Location: India
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote archies Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2010 at 1:10am
Hi Oleg;

Please don't keep me waiting for so Long.....

Please see me above issue....

How can we Attach the 24*22 size Bitmap in the "xtpConrolButton" ?

Is it possible or not ?

Thnx in Advance
Back to Top
archies View Drop Down
Groupie
Groupie


Joined: 17 November 2009
Location: India
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote archies Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2011 at 12:32am
Hi;
If we set the Style "xtpButtonIconAndCaptionBelow" in CXTPControl object.
pXtpControl->SetStyle(xtpButtonIconAndCaptionBelow);

Now , Big Button have been displayed .
That Button having 32*32 icon + Text below.

I have both the Big Button and the Normal button in a Ribbon.

hence to place the 24*22 icon on the big button i use :

pXtpControl->SetIconSize(CSize(24,22));

But this can't make the icon as 24*22 i=on Big button.

Back to Top
archies View Drop Down
Groupie
Groupie


Joined: 17 November 2009
Location: India
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote archies Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2011 at 8:39am
Hi oleg;

I am adding "CXTPControlPopup" control with control type "xtpControlSplitButtonPopup".

Then i set the XTPButtonStyle as "xtpButtonIconAndCaptionBelow"

Then i add icon on Button :
pControl->GetImageManager()->SetIcon(hIcon,cmdIDBtn);

The icon of size 32*32 coming correct .
But if i wish to show the 24*22 sized icon , it get blurred/poor quality.

How can we set the XTPCommandBar --> so that large icon size will be 24*22 and small icon size will be 16*15.

Please suggest any solution.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2011 at 12:00pm
Sorry all icons should be same size.  You can open in editor and add transparent borders around to make it 32*32.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
archies View Drop Down
Groupie
Groupie


Joined: 17 November 2009
Location: India
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote archies Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2011 at 12:36am
Thanx Oleg
Now it works.
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.188 seconds.