locked
ISSUES debugging a C++ program Using Codejock SkinFramework Pro for a big MFC Application. and general C++ questions using MFC with static libraries RRS feed

  • Question

  • Hello, I'm asking people who know Codejock SkinFramework or Toolkit

    I bought the pro Version of SkinFramework from Codejock to apply some skins for my MFC application.

    Last week I downloaded the toolkit pro Evaluation version, I tried to add skins and everything was alright.



    I added only this to my code:

    //So to add a Skin I used this in the stdafx.h : 
    #include <XTPToolkitPro.h>
    
    
    //And in my dialog constructor : 
    XTPSkinManager()->LoadSkin(_T("C:\\Windows8.cjstyles"));
    
    

    And my app was skinned with any cjstyles or msstyles. (in debug mode only because the only options available in an Evaluation version of the toolkit is "Using MFC in a shared DLL")



    This time I'm doing the exact same thing, but with SkinFramework Pro, but it's not working. The code is generating well, but when I Debug my solution. The app is cashing directly. the change is here is that i want to use "using MFC in a static library" and in Multi thread so in both release and Debug Mode. (you can find down my command lines for this project)

    So what I added to my code with The pro Version of SkinFramework (v17) is this :

    //So to add a Skin I used this in the stdafx.h : 
    #include <XTSkinFrameworkPro.h> 
    
    
    //And in my dialog constructor : 
    XTPSkinManager()->LoadSkin(_T("C:\\Windows8.cjstyles")); 

    And this is generating but The application is not executing anymore with this window appearing:

    I remember I've got problems with Paths before and I had the same issues so I put the cjstyle directly in the C disk root.

    ___________________________________

    1st question is : 

    what is the right way to write this line :

    XTPSkinManager()->LoadSkin(_T("C:\\Windows8.cjstyles")); 

    but using this path "C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Source\SkinFramework\Styles\Windows8.cjstyles" instead of "C:\\Windows8.cjstyles".


    ___________________________________

    2nd Question :

    If I want to compile it with "using MFC with static library" and "MT" (Multi Thread) and Static Debug, or static Release, do I have to add the DLLs or .Lib(s) to my folder? Do you know a link [or in a beautifull reply (^^)]  that can quickly help me to understand.

    because I have a lot of Libs and Dlls of codejock that i recieved with it. So I don't know which one i include in the properties, or copy in my folder (I'm quiet lost in this part)

    ___________________________________


    my command lines in Release mode :

    For C/C++ options :

    /GS /analyze- /W1 /Gy /Zc:wchar_t /I"C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Source" /I"c:\Program Files\Microsoft SDKs\Windows\v7.1\Include" /I"jsoncpp" /I"..\pjlib\include" /I"..\pjsip\include" /I"..\pjmedia\include" /I"..\pjnath\include" /I"..\pjlib-util\include" /Zi /Gm- /O2 /Fd"Release\vc110.pdb" /fp:precise /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /Oy- /MT /Fa"Release\" /EHsc /nologo /Fo"Release\" /Fp"Release\microsip.pch" 

    For link editor :

    /OUT:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Release\microsip.exe" /MANIFEST /NXCOMPAT /PDB:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Release\microsip.pdb" /DYNAMICBASE "imm32.lib" "version.lib" "winmm.lib" "strmbase.lib" "mapi32.lib" "JabraNativeHid.lib" "Spokes.lib" /MACHINE:X86 /NODEFAULTLIB:"libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib" /OPT:REF /SAFESEH:NO /INCREMENTAL /PGD:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Release\microsip.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Release\microsip.exe.intermediate.manifest" /OPT:NOICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Lib\vc110" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib" /LIBPATH:"c:\OpenSSL\lib\VC\static" /LIBPATH:"../third_party/opencore-amrnb" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses\Release" /LIBPATH:"../lib" /LIBPATH:"../ffmpeg/lib" /TLBID:1 

    My command Lines in Debug Mode :

    for C/C++ options:

    /GS /analyze- /W1 /Gy /Zc:wchar_t /I"C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Source" /I"c:\Program Files\Microsoft SDKs\Windows\v7.1\Include" /I"jsoncpp" /I"..\pjlib\include" /I"..\pjsip\include" /I"..\pjmedia\include" /I"..\pjnath\include" /I"..\pjlib-util\include" /ZI /Gm- /Od /Fd"Debug\vc110.pdb" /fp:precise /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MTd /Fa"Debug\" /EHsc /nologo /Fo"Debug\" /Fp"Debug\microsip.pch" 

    For link editor :

    /OUT:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Debug\microsip.exe" /MANIFEST /NXCOMPAT /PDB:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Debug\microsip.pdb" /DYNAMICBASE "imm32.lib" "version.lib" "winmm.lib" "strmbasd.lib" "mapi32.lib" "Spokes.lib" "JabraNativeHid.lib" /DEBUG /MACHINE:X86 /NODEFAULTLIB:"libcmt.lib" /SAFESEH:NO /INCREMENTAL /PGD:"C:\MySIP\MicroSIP-3.10.11-Email-Jabra-Plantro\Debug\microsip.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Debug\microsip.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib" /LIBPATH:"c:\OpenSSL\lib\VC\static" /LIBPATH:"../third_party/opencore-amrnb" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses\Release" /LIBPATH:"../lib" /LIBPATH:"../ffmpeg/lib" /LIBPATH:"C:\Program Files (x86)\Codejock Software\MFC\Xtreme Skin Framework v17.1.0\Lib\vc110" /TLBID:1 


    Thank you all for you help and sorry for my english level!

    Sincerely, Ahmed.

    Wednesday, March 30, 2016 12:15 PM

Answers

  • Hello I want to propose this as an answer even if it's a third party but maybe it can help someone as me who looked on Msdn :)

    first of all I was compiling a windows xp themed program in v140. and that was the main issue.

    because once i compiled the program in v140_xp it was much better and the codejock skin framework worked instantly.

    secondly the path was surely wrong I put the skin in my Release and Debug folders and then to load the skin it was much easier :

    	XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() | xtpSkinApplyMetrics);
    	XTPSkinManager()->SetAutoApplyNewWindows(TRUE);
    	XTPSkinManager()->LoadSkin(_T(".\\Office2010.cjstyles"));
     

    That's it for the solution of this issue. 

    Thank you all for your replies.

    Friday, October 7, 2016 1:05 PM

All replies

  • Hello,

     Not sure if anyone will assist you with a 3rd party suite. Best bet is to visit the software site for answers.

    Goodluck! :)

    Wednesday, March 30, 2016 10:00 PM
  • Hello,

     Not sure if anyone will assist you with a 3rd party suite. Best bet is to visit the software site for answers.

    Goodluck! :)

    User3DX is right. It's not that we don't want to help.  It simply that you can probably receive more targeted and relevant advice from people who know and use the specific product in question.  Codejock forums are at http://forum.codejock.com/ and there is a support link at https://www.codejock.com/support/



    • Edited by RLWA32 Wednesday, March 30, 2016 10:08 PM
    • Proposed as answer by Hart Wang Thursday, March 31, 2016 2:53 AM
    Wednesday, March 30, 2016 10:07 PM
  • As Already mentioned w.r.t third party utility it is always good if you ask question directly to him .Here is what i think .

    And 1:- In your question what you are looking is only the path change. So it should be straight forward.

    XTPSkinManager()->LoadSkin(_T("C:\\Program Files (x86)\\Codejock Software\\MFC\\Xtreme Skin Framework v17.1.0\\Source\\SkinFramework\\Styles\Windows8.cjstyles"));

    But Same time as you are using hard coded path, this will not going to work on your deployment machine , So you have to write installer in such a way that you are coping file at some fix location on installation and reading it from that location only.

    2) If you going to use static library compilation option even in that case you have to provide the path of dependent library to your solution else you will get linker error but it will save you to deploy all dependent library separately to the client , don't forget it will increase size though.

    for dependency for any exe etc you can use dependency walker to know the dependent dll. 

    Thanks



    Rupesh Shukla

    Thursday, March 31, 2016 1:12 AM
  • Hi,<o:p></o:p>

    I agree with RLWA32. If you want to get help. You can receive relevant advice from people who use this product.<o:p></o:p>

    From what I know when working with statically-linked 3rd-party binary-only libraries that have been built with different runtime options, /MT in the main application tends to cause conflicts much more often than /MD.<o:p></o:p>



    Best Regards,<o:p></o:p>



    Hart<o:p></o:p>


    Thursday, March 31, 2016 2:53 AM
  • Hello I want to propose this as an answer even if it's a third party but maybe it can help someone as me who looked on Msdn :)

    first of all I was compiling a windows xp themed program in v140. and that was the main issue.

    because once i compiled the program in v140_xp it was much better and the codejock skin framework worked instantly.

    secondly the path was surely wrong I put the skin in my Release and Debug folders and then to load the skin it was much easier :

    	XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() | xtpSkinApplyMetrics);
    	XTPSkinManager()->SetAutoApplyNewWindows(TRUE);
    	XTPSkinManager()->LoadSkin(_T(".\\Office2010.cjstyles"));
     

    That's it for the solution of this issue. 

    Thank you all for your replies.

    Friday, October 7, 2016 1:05 PM