Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - QUESTION: LoadIcons from XML
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

QUESTION: LoadIcons from XML

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

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Topic: QUESTION: LoadIcons from XML
    Posted: 17 October 2008 at 8:06am
I like to know the Id of icons after reading them from XML and importing into an ImageManager.

The XML-File is created from an ImageManager and looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<DesignerFile CompactMode="1" Schema="33">
    <Images>
        <IconSet Id="4">
            <Icon Width="16" Data="ABAAAAA..."/>
        </IconSet>
        <IconSet Id="2">
            <Icon Width="16" Data="ABAAAAAABCAAAAAAE...

What I need are the Ids of the Icon: 4, 2, ...
Where can I find this Id's in the ImageManager.Icons?
Is this information lost after import?

Additional question: Do the icons with alpha blending still have alpha blending after this export and import?

Code fragments to
SaveIcons:
Dim myStateOptions As StateOptions
Set myStateOptions = CommandBars1.CreateStateOptions
myStateOptions.SerializeImages = True
myStateOptions.SerializeLayout = False

Dim PropExchange As PropExchange
Set PropExchange = CommandBarsGlobalSettings.CreatePropExchange
PropExchange.CreateAsXML False, "DesignerFile"
CommandBars1.DoPropExchange PropExchange, myStateOptions
PropExchange.SaveToFile App.Path & "\Icons.xml"

LoadIcons:
Dim myStateOptions As StateOptions
Set myStateOptions = CommandBars1.CreateStateOptions
myStateOptions.SerializeImages = True
myStateOptions.SerializeLayout = False

Dim PropExchange As PropExchange
Set PropExchange = CommandBarsGlobalSettings.CreatePropExchange
PropExchange.CreateAsXML True, "DesignerFile"
If PropExchange.LoadFromFile(App.Path & "\Icons.xml") Then
    CommandBars1.DoPropExchange PropExchange, myStateOptions           
End If

Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
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: 20 October 2008 at 6:56am
Hi,
 
1. Indeed there is no way to enumerate images in eimagemanager. You can only loop all Ids and check if GetImage will return something  :(
 
2. alpha blending  will be fine :)
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.