![]() |
Store Icon to XML and load it |
Post Reply ![]() |
Author | |
jimmy ![]() Senior Member ![]() Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi, You can save all icons of imagemanager with pImages->DoPropExchange.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jimmy ![]() Senior Member ![]() Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
![]() ![]() ![]() ![]() ![]() |
Thanks
Jimmy |
|
![]() |
|
Jouden ![]() Newbie ![]() ![]() Joined: 24 July 2013 Location: Germany Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Jouden ![]() Newbie ![]() ![]() Joined: 24 July 2013 Location: Germany Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
Anyone who can help me out? Please?
|
|
JC
|
|
![]() |
|
jimmy ![]() Senior Member ![]() Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Jouden ![]() Newbie ![]() ![]() Joined: 24 July 2013 Location: Germany Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
Thanks Jimmy,
I will start investigating this. Regards, Jc
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |