Print Page | Close Window

Trouble visualizing 2 icon formats

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Shortcut Bar
Forum Description: Topics Related to Codejock Shortcut Bar
URL: http://forum.codejock.com/forum_posts.asp?TID=4886
Printed Date: 05 May 2024 at 6:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Trouble visualizing 2 icon formats
Posted By: EMoscosoCam
Subject: Trouble visualizing 2 icon formats
Date 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.
 



Replies:
Posted By: Oleg
Date Posted: 25 August 2006 at 8:46pm
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


Posted By: EMoscosoCam
Date Posted: 25 August 2006 at 11:27pm
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?


Posted By: Oleg
Date Posted: 25 August 2006 at 11:33pm
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net