![]() |
Different Icon sizes for toolbars and menus |
Post Reply
|
| Author | |
MacW
Senior Member
Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Quote Reply
Topic: Different Icon sizes for toolbars and menusPosted: 24 July 2007 at 5:37am |
|
Hi, I have different sets of icons (32x32, 16x16). I want to use the large icons for toolbars, and the small icons for menus.
When I set the large icons using XTPImageManager()->SetIcons, the icons in toolbars look good, but the icons in menus look awful. Apparently XTP resizes the icons using the simple StretchBlt API function. I made some experiments with
but this usually causes all command bars to show no icons anymore. What is please the correct sequence of method calls, and which objects to I need to tell which information? |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 July 2007 at 1:51am |
|
Hello,
I think better call
pcb->GetCommandBarsOptions()->bLargeIcons = TRUE;
it will use large icons by default - 32*32. but also allow user to change it back in customize dialog.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
MacW
Senior Member
Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 July 2007 at 10:42am |
|
Hi, Oleg
this does not change anything. The icons in the menus are still 16x16 pixels. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 July 2007 at 7:12am |
|
Hi,
In first message you wrote that want 16x16 icons for menu....
if you see small icons in toolbar, temporary comment LoadCommandBars call.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
MacW
Senior Member
Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 July 2007 at 8:38am |
|
Hi, Olec
You're right. I want 16x16 pixel bitmaps for menus. But I don't want XTP to create these from the 32x32 pixel bitmaps I set via the XTPImageManager... call. The XTP resize algorithm creates ugly-looking bitmaps in the menu. I have better routines for that. I want to set one set of icons to use in toolbars. I use my 32x32 icon set for that. And another set of icons to be used in command bars (menus). I want to use my 16x16 icon set for that. I create different sizes from my original vector sources, and the quality is hence very good for both sizes. How do I set one set of icons for toolbars, and another for the menus? I did not find a working solution in the samples, and neither instructions in the XTP documentation. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 July 2007 at 12:15pm |
|
Call pCommandBars->GetImageManager()->SetIcons(IDR_MAINFRAME, IDB_MAINFRAME_SMALLICONS);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
MacW
Senior Member
Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 July 2007 at 6:29am |
|
Hi,
if you look at my initial post, this is exactly what I'm doing. Without success. Seems that there needs to be done more, or in a different sequence. Is there anywhere a working sample? |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 July 2007 at 6:52am |
|
Hello,
See
Samples\CommandBars\CommandBarIcons
and
Samples\UserInterface\GUI_WinZip
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |