Print Page | Close Window

QUESTION: LoadIcons from XML

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=12469
Printed Date: 17 June 2025 at 7:59am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: QUESTION: LoadIcons from XML
Posted By: Jean
Subject: QUESTION: LoadIcons from XML
Date 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



Replies:
Posted By: Oleg
Date 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



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