Print Page | Close Window

how to create cjstyle file from msstyle

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=10531
Printed Date: 28 September 2024 at 5:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to create cjstyle file from msstyle
Posted By: stenn
Subject: how to create cjstyle file from msstyle
Date 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



Replies:
Posted By: Oleg
Date 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


Posted By: stenn
Date 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?





Posted By: Oleg
Date Posted: 07 May 2008 at 11:41am
Hi,
try instaed
"_T("NormalBlue.ini"))
use NULL


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


Posted By: stenn
Date 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...)





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