Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Shortcut Bar
  New Posts New Posts RSS Feed - Adding 16x16 and 24x24 icons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adding 16x16 and 24x24 icons

 Post Reply Post Reply
Author
Message
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Topic: Adding 16x16 and 24x24 icons
    Posted: 06 August 2008 at 11:17am
I have all of my icons (both 16x16 and 24x24) stored in a single ImageManager object.  The problem is that the the same icon will have two seperate ids (one id for each size).  The ShortcutBarItem object only allows for one id to be set.  How do I get the ImageManager to have the same id for both icon sizes? 

I had it working by loading the icons into two different ImageLists but I want to use the CodeJock ImageManager control instead of the Microsoft ImageList control. 

Can anyone help me out with this?
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: 07 August 2008 at 2:11am
Hi,
You have copy icons to use same Ids.  Its wrong logic to have different ids for same icons.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 07 August 2008 at 2:01pm
I guess I wasn't clear.  I have the same icon in two seperate sizes.  Each size is in their own icon file.  So I have an image that is 16x16 in one file and a 24x24 version of the same image in a second file.  Both of these files are loaded into an ImageManager object and since they are two different files, they have two different ids.  The ShortcutBarItem only accepts one icon id so I can pick one of the sizes to use even though the ShortcutBarItem needs to be able to display two different sizes.

If I let the ShortcutBar resize the icons as needed, it looks really bad.  I tried using an .ico file that has both the 16x16 and 24x24 icons in a single file but the ShortcutBar will only find the larger icon and ignores the smaller icon.
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: 08 August 2008 at 6:43am
Hi,
 
I understood and suggested load 2 files to same Id - ImageMaanger allow such trick. Just try :)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2008 at 8:30am
I did as you suggested.  I am able to add both sizes as a single icon id but the ShortcutBar appears to ignore the 24x24 size.  When it needs to display the larger icon size, it resizes the 16x16 icon and it doesn't look very good.
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: 08 August 2008 at 1:02pm
Hi,
 
Have to work. You do something wrong. Please attach sample project.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2008 at 4:31am
I was putting together a sample project and I think I found the problem.  I was loading the icons into the ImageManager directly from a resource file and this wasn't working.  However, when I load in the icons directly from a file, it does work.  So I modified the program to put the icons in a temporary file and it looks everything works now.  Thanks for your help.
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.203 seconds.