Print Page | Close Window

How to compile skin library file into program?

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=14692
Printed Date: 21 June 2025 at 10:57pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to compile skin library file into program?
Posted By: imfool
Subject: How to compile skin library file into program?
Date Posted: 06 July 2009 at 3:49am

HI,
I'm now trying to add Office2007 skins for my dialogs, as I know, I need the skin library "Office2007.cjstyles" and use it by calling the XTPSkinManager()->LoadSkin() function. This function will use CXTPSkinManagerResourceFile::Open() to load this skin library, but now it only supports loading from files, and I need to move it into the program and use it as other resources.
Here is my solution: first include the "Office2007.rc" in the .rc file of my project, which will compile the library into the .exe; then write another CXTPSkinManagerResourceFile::Open() which will replace the library module handle (m_hModule) to the application instance handle. But in this way I have to change the low-level codejock in class CXTPSkinManagerResourceFile, is there anyway that can avoid this? Or any better solutions?
PS: I'm working with Xtreme Toolkit Pro v13.0

Thanks a lot.




Replies:
Posted By: Oleg
Date Posted: 08 July 2009 at 3:31am
Hi,
 
Yes, include rc file in your res\app.rc2 file and add in code
 
   XTPSkinManager()->GetResourceFile()->SetModuleHandle(AfxGetInstanceHandle());
   XTPSkinManager()->LoadSkin(0, _T("NormalBlue.INI"));


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


Posted By: imfool
Date Posted: 14 July 2009 at 11:15pm
Thanks Oleg, it works!



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