Trouble visualizing 2 icon formats |
Post Reply |
Author | |
EMoscosoCam
Newbie Joined: 15 August 2006 Location: Peru Status: Offline Points: 10 |
Post Options
Thanks(0)
Posted: 25 August 2006 at 3:57pm |
(Using version 10.1)
I have an .ico file with 2 formats within: A 16x16 icon and a 24x24 icon, both with a color depth of 256. I intend to use both icon formats from this file using the following procedure:
1) Load the icon file into the Resource File associated to my VB 6 project.
2) Instantiate a StdPicture object from the resource file using the LoadResPicture() function.
3) Pass the handle of the icon to the ShortcutBar control from the StdPicture object.
I would expect the shortcutbar control to show both icon formats accordingly, but the 16x16 format is shown in the 24x24 place (a non-hidden item) and this format is shrinken in order to show it the 16x16 place (a hidden item); that is, the 24x24 format is ignored.
Is this a normal behaviour of the ShortcutBar control? How can I show both icon formats from the same file?
Thanks a lot in advanced.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
StdPicture can't load 2 icons, so it load only one icon and pass its handle to ShortcutBar.
As solution divide Icon to 2 icons.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
EMoscosoCam
Newbie Joined: 15 August 2006 Location: Peru Status: Offline Points: 10 |
Post Options
Thanks(0)
|
Thanks a lot for your reply.
Since an item has only a single IconHandle property, how can I pass a handle for 2 icon formats?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
As I wrote you can't - StdPicture can hold only 1 handle....
create 2 icons - myiconssmall.ico + myiconlarge.ico
|
|
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 |