Print Page | Close Window

Store Icon to XML and load it

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=12022
Printed Date: 17 June 2025 at 4:52pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Store Icon to XML and load it
Posted By: jimmy
Subject: Store Icon to XML and load it
Date Posted: 29 August 2008 at 9:18am
Hello,

Is there a funcktion to save a Icon to XML File
IconFileToBinary( CString strIconFile, CByteArray& data)
PX_Blob(....data);

Or
HICON hIcon = LoadIconFromFile(strIconFile);
IconToBinary(hIcon, CByteArray& data)

and back
CreateIconFromBinary

  Jimmy




Replies:
Posted By: Oleg
Date Posted: 29 August 2008 at 4:07pm

Hi,

You can save all icons of imagemanager with pImages->DoPropExchange.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: jimmy
Date Posted: 29 August 2008 at 6:13pm
Thanks
 
  Jimmy



Posted By: Jouden
Date Posted: 24 July 2013 at 9:22am
Hello Oleg,
 
Could you please provide an example in C++? I'am trying to write BLOB info from imagemanager to a database but without any succes till sofar.
 
I need an example to write to CByteArray if possible.
 
Regards,


-------------
JC


Posted By: Jouden
Date Posted: 24 July 2013 at 10:28am
Anyone who can help me out? Please?

-------------
JC


Posted By: jimmy
Date Posted: 26 July 2013 at 3:54pm
static void NodeAddBinary(CXTPPropExchangeXMLNodeEx& node, LPCTSTR lpSectionName, const CByteArray& csaData)
{
    BYTE *pData = (BYTE*) csaData.GetData();
    DWORD dwLen = (DWORD) csaData.GetCount();

    CXTPPropExchangeSection pxSection(node.GetSection(lpSectionName));
    PX_ULong(&pxSection, "DataLen", dwLen, 0);
    PX_Blob(&pxSection, "Data", pData, dwLen );
}

For Reading you can first read DataLen, than you can set the CByteArray Size to DataLen and load Blob.

  Jimmy



Posted By: Jouden
Date Posted: 27 July 2013 at 5:18am
Thanks Jimmy,
 
I will start investigating this.
 
Regards,
Jc



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