Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - ImageManagerIcons question -- image by index
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ImageManagerIcons question -- image by index

 Post Reply Post Reply
Author
Message
MadRiver View Drop Down
Groupie
Groupie


Joined: 21 August 2008
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadRiver Quote  Post ReplyReply Direct Link To This Post Topic: ImageManagerIcons question -- image by index
    Posted: 01 December 2008 at 12:46pm
Is it possible to get an image by index, and then get the command ID associated with that image?

Xtreme CommandBars ActiveX v 12.1.0

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 01 December 2008 at 1:11pm
The image manager does not know which commands use them.  What are you needing this for?
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: 02 December 2008 at 2:35am
I believe your only option would be to loop through the CommandBarControls collection and check each control to see if the icon ID matches your image index.  I guess you could also create your own data structure to store the information.  It would require more code but would probably be more efficient.
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0
Back to Top
MadRiver View Drop Down
Groupie
Groupie


Joined: 21 August 2008
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadRiver Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2008 at 8:31am
Thanks for the reply.
I am using your second approach: when we load the images we populate a map of image index->command id.

Background: Users can add toolbar buttons via script; in the script they can select an icon to use by specifying its index in our default set of images.
Xtreme CommandBars ActiveX v 12.1.0

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.125 seconds.