Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Images in .cjstyles
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Images in .cjstyles

 Post Reply Post Reply
Author
Message
sodind View Drop Down
Groupie
Groupie


Joined: 16 March 2011
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote sodind Quote  Post ReplyReply Direct Link To This Post Topic: Images in .cjstyles
    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.
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post 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



Back to Top
sodind View Drop Down
Groupie
Groupie


Joined: 16 March 2011
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote sodind Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post 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



Back to Top
sodind View Drop Down
Groupie
Groupie


Joined: 16 March 2011
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote sodind Quote  Post ReplyReply Direct Link To This Post 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);
}
}
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post 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



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.