Print Page | Close Window

Images in .cjstyles

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=21969
Printed Date: 22 November 2024 at 1:50am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Images in .cjstyles
Posted By: sodind
Subject: Images in .cjstyles
Date Posted: 04 November 2013 at 8:59am
Hello,
Is there a way to add any images to .cjstyles files? For example some icons or logos.
Thank you.



Replies:
Posted By: Willowmaster
Date Posted: 07 November 2013 at 9:50am

Put the image in the project directory and reference it with a property in the SkinBuilder. It will be included in the .cjstyles file when you export it.



-------------
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0





Posted By: sodind
Date Posted: 08 November 2013 at 11:49am
It does not work. I tried to put png file in folder with other images and added a image property.


Posted By: Willowmaster
Date Posted: 12 November 2013 at 5:51am
Not sure if Skinbuilder checks it the control uses the image property or not, but maybe the control you set the image property does not support it. Which control did you add the image property? Maybe you can zip the project and share it so I can check for you if I encounter the same problems.

-------------
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0





Posted By: sodind
Date Posted: 12 November 2013 at 3:24pm
Hello,
I open skinproj file in Notepad and add:
<Property Part="CustomImage" Name="BgType" Value="ImageFile"/>
<Property Part="CustomImage" Name="ImageFile" Value="%ImageFolder%\\CustomImage.bmp"/>
<Property Part="CustomImage1" Name="BgType" Value="ImageFile"/>
<Property Part="CustomImage1" Name="ImageFile" Value="%ImageFolder%\\CustomImage1.bmp"/>

to <Class Name="Globals">. After that i save this file and open it in Skin Builder. After export I cannot use it. I tried to use it like:
CXTPSkinImages* pImages = new CXTPSkinImages();

if(pImages != NULL)
{
CXTPSkinImage* pImage = pImages->LoadFile(m_pSchema->GetResourceFile(), _T("AERO\\CustomImage.bmp"));

if(pImage != NULL)
{
pImage->DrawImage(pDC, CRect(0,0,25,25), CRect(0,0,25,25), CRect(0,0,0,0), m_clInactiveLight, 0, 0);
}
}


Posted By: Willowmaster
Date Posted: 14 November 2013 at 4:31am
Ah. Alright. They build a program to make these project files. If you adjust that by hand there is a
possibility that you are doing something that won't have any effect or even introduce errors.  
 
Analysing your XML I see that you added the Part attribute, but when I load the skinproject, Globals doesn't show that part. So I guess Skin builder does not understand the Part attribute for the Global class or it is not a supported by the Global class.
 
If you want to look if the image is in the cjstyles file you can use a resource viewing tool to see if it there. I use XN Resource Editor and I like it a lot.
 
About the code you posted: I'm an ActiveX user so I can not help you with that.


-------------
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0






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