Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Shortcut Bar
  New Posts New Posts RSS Feed - Trouble visualizing 2 icon formats
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Trouble visualizing 2 icon formats

 Post Reply Post Reply
Author
Message
EMoscosoCam View Drop Down
Newbie
Newbie


Joined: 15 August 2006
Location: Peru
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote EMoscosoCam Quote  Post ReplyReply Direct Link To This Post Topic: Trouble visualizing 2 icon formats
    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.
 
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: 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
Back to Top
EMoscosoCam View Drop Down
Newbie
Newbie


Joined: 15 August 2006
Location: Peru
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote EMoscosoCam Quote  Post ReplyReply Direct Link To This Post 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?
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: 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
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.156 seconds.