Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - how to create cjstyle file from msstyle
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to create cjstyle file from msstyle

 Post Reply Post Reply
Author
Message
stenn View Drop Down
Newbie
Newbie
Avatar

Joined: 06 May 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote stenn Quote  Post ReplyReply Direct Link To This Post Topic: how to create cjstyle file from msstyle
    Posted: 06 May 2008 at 5:21pm
i have just started to work with the tool kit, so please bear with me.

i have tried to create a cjstyles file using an existing msstyle file (and components).  i save the project... creating the .skinproj file... i then export to the cjstyles format... creating a cjstyles file.

but when i try to use it, using code that does load the predefined skins just fine, it does not load.

question: 
do i need to change my uxtheme.dll file in order for the unsigned skins to work in xp?

thanks in advance,

stenn

ps: using winxpsp1
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: 07 May 2008 at 1:29am
Hello,
 
Attach you cjstyles in issuetrack/or here and show code you have to load it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
stenn View Drop Down
Newbie
Newbie
Avatar

Joined: 06 May 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote stenn Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2008 at 10:02am
this is a basic mfc dialog sample.  i modified the following method:

---
BOOL Ctest03_skinsApp::InitInstance()
{
  INITCOMMONCONTROLSEX InitCtrls;
  InitCtrls.dwSize = sizeof(InitCtrls);
  InitCtrls.dwICC = ICC_WIN95_CLASSES;
  InitCommonControlsEx(&InitCtrls);

  CWinApp::InitInstance();
  AfxEnableControlContainer();

  //--[ CodeJock skin code ]-----------------------------------------------
  CXTPWinDwmWrapper().SetProcessDPIAware();

  TCHAR szStylesPath[_MAX_PATH];
  CString m_strStylesPath;

  VERIFY(::GetModuleFileName(AfxGetApp()->m_hInstance, szStylesPath, _MAX_PATH));       
   
  m_strStylesPath = szStylesPath;
  int nIndex  = m_strStylesPath.ReverseFind(_T('\\'));
  if (nIndex > 0) {
    m_strStylesPath = m_strStylesPath.Left(nIndex);
  }
  else {
    m_strStylesPath.Empty();
  }
  m_strStylesPath += _T("\\..\\Styles\\");

  XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() | xtpSkinApplyMetrics);

//  XTPSkinManager()->LoadSkin(m_strStylesPath + _T("Office2007.cjstyles"), _T("NormalBlue.ini"));   
  XTPSkinManager()->LoadSkin(m_strStylesPath + _T("DXB.cjstyles"), _T("NormalBlue.ini"));   

  //--[ /CodeJock skin code ]----------------------------------------------

  Ctest03_skinsDlg dlg;
  m_pMainWnd = &dlg;
  INT_PTR nResponse = dlg.DoModal();
  if (nResponse == IDOK)
  {
  }
  else if (nResponse == IDCANCEL)
  {
  }
  return FALSE;
}

---

please note... if i modify the call to LoadSkin such that is loads
Office2007 instead of DXB, it will render using the expected skin. 

to create the DXB.cjstyles, i downloaded the skin from the skin page (yes, i know it's a 3rd party skin... i'm checking the ability to use such skins as there are more available)... and imported the msstyles file.  then saved and exported the cjstyles file.

this is my understanding how it should be done.  if this is not correct, please let me know.

also, i have not modified my
uxtheme.dll ... is that required in order for codejock skins to apply to my application?



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: 07 May 2008 at 11:41am
Hi,
try instaed
"_T("NormalBlue.ini"))
use NULL
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
stenn View Drop Down
Newbie
Newbie
Avatar

Joined: 06 May 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote stenn Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2008 at 11:47am
thanks for your response.

that worked.  i'm a bit fuzzy on what the ini file is for (i'll investigate)

a suggestion:
some form of return code or error code somewhere that would give me a hint as to what the problem was would be very helpful

thanks again (now playing with menus... not supported.. tweaking to command bars...)


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.188 seconds.