Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to compile skin library file into program?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to compile skin library file into program?

 Post Reply Post Reply
Author
Message
imfool View Drop Down
Newbie
Newbie


Joined: 11 June 2009
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote imfool Quote  Post ReplyReply Direct Link To This Post Topic: How to compile skin library file into program?
    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.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
imfool View Drop Down
Newbie
Newbie


Joined: 11 June 2009
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote imfool Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2009 at 11:15pm
Thanks Oleg, it works!
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.046 seconds.