Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - How to use with Visual c++ 2005
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to use with Visual c++ 2005

 Post Reply Post Reply
Author
Message
coolvicki7 View Drop Down
Groupie
Groupie


Joined: 12 June 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolvicki7 Quote  Post ReplyReply Direct Link To This Post Topic: How to use with Visual c++ 2005
    Posted: 12 June 2008 at 3:44am
Hello,
 
I have already created my application(with normal MFC wizard and not with toolkit wizard). Now I want to use skinframework in my application.
 
Can someone guide me through the process like which files to include in my project, which class object to be created and which functions to call and where?
 
I even tried the ActiveX alternative but whenever i try to add a variable to the control, it gives some script error.
 
It has really been hard to find out how the things work but i must say the samples looks great with very little extra resourse consumption and so i am still searching to find out a way.
 
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: 12 June 2008 at 4:47am
Hi,
 
All you need is single line in construcor of Frame:
 
XTPSkinManager()->LoadSkin(m_strStylesPath + _T("Office2007.cjstyles")); 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
coolvicki7 View Drop Down
Groupie
Groupie


Joined: 12 June 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolvicki7 Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2008 at 5:19am

Thank You for your quick reply. From where XTPSkinManager() comes, I mean please treat me as an absolute beginer in this case and tell me which classes to include and from where. I will be glad if its step by step.

Back to Top
coolvicki7 View Drop Down
Groupie
Groupie


Joined: 12 June 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolvicki7 Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2008 at 5:15am
Is there anyone who can help? Plz.
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: 13 June 2008 at 6:40am
Hi,
 
to include toolkit add
 
#include "XTToolkitPro.h" line in stdafx.h
 
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
coolvicki7 View Drop Down
Groupie
Groupie


Joined: 12 June 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolvicki7 Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2008 at 1:23pm

thanks for your help but its still not working... the app compile well but when i try to run it, it gives ToolkitProEval1200vc80UD.dll not found.

I even tried to copy this dll to the application folder, now it gives application failed to initialize. As far as i can analyze, it should be because of bad installation.

I even tried regsvr32 but it denied to register it.
 
Please guide.
 
PS: Now I am wondering if ActiveX is a better option, please answer in straight words, can SkinFramework ActiveX be used with Visual C++ 2005, if yes, How? Actually, I tried it before but it was not allowing me to add variable to it, it was giving some script error.
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: 13 June 2008 at 4:18pm

Hi,

Copy this dll to Unicode_Debug folder of your project.
 
Start from our samples. Navigate samples in Samples\SkinFramework folder, compile and run them.
 
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
coolvicki7 View Drop Down
Groupie
Groupie


Joined: 12 June 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolvicki7 Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2008 at 11:50pm
Tried this too... Even your samples are giving the same problem. The error is The application failed to initialize properly (0xc0150002). Click OK to terminate the application.
I have tried your toolkit on two different PCs just incase if there is problem with one but still no help.
 
Please get me out of this, I really want to use yur product. Thanks
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: 14 June 2008 at 5:23am
Our evaluation version compiled with Visual Studio 2005 with SP1.  If you don't have SP1 such problem can appear. Install it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
coolvicki7 View Drop Down
Groupie
Groupie


Joined: 12 June 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolvicki7 Quote  Post ReplyReply Direct Link To This Post Posted: 16 June 2008 at 12:46am

Alright, finally the skin is now applied. Thanks a lot but now another problem, My application make some graph and use bitblt in the onpaint()

When I perform the action that builds this graph, i get this exception -

Program: MyProgramName.exe

Module: ToolkitProEval1200vc80UD.dll

Run-Time Check Failure #0 - The value of ESP was not properly saved across a fuction call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with different calling convention.

My Application works fine without your code.

Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post Posted: 16 June 2008 at 10:03pm
I haven't seen this in a long time, but if I remember correctly:

Running in the debugger, you should be able to see where in the code this occurs (what function was just called). This may be helpful.

You may also want to link statically; this can often result in more robust debug information on the RTC failure.

Back to Top
coolvicki7 View Drop Down
Groupie
Groupie


Joined: 12 June 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolvicki7 Quote  Post ReplyReply Direct Link To This Post Posted: 16 June 2008 at 11:20pm
Hello Smucker, thanks for replying. Debugger is not showing anything except assembly as the error occurs in a dll function... which function? I dont know. I cannot link statically because I am running eval version, I would really love to buy it but atleast it should work first.
 
One thing I noted, this error occurs after a thread started by my process terminates. I think here somewhere is the catch.
 
I am creating thread by -

MyThread = CreateThread(0,0,(LPTHREAD_START_ROUTINE)MyFunc,(LPVOID)TRUE,0,0);

I even kept this thread func empty to be sure that there is nothing wrong with the function, it still gave the error. So I am pretty sure now threads has to do something with skinframework.

Please help.
Back to Top
coolvicki7 View Drop Down
Groupie
Groupie


Joined: 12 June 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolvicki7 Quote  Post ReplyReply Direct Link To This Post Posted: 17 June 2008 at 12:02am
ok just got it... sorry for all the confusion... the func that i was running using CreateThread was not created with standard norms and so i was getting the problem... My function was returning void but actually it should have been DWORD... I dont know how it was working without SkinFramework... but I am glad its working now... Thanks for all the support.
 
Now I would like to buy it, one question, for using SkinFrameWork, I only need to buy SkinFrameWork Component instead of complete Toolkit, Right?
Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post Posted: 17 June 2008 at 12:12am
Some thread notes:

1. Be sure your thread is declared and defined WINAPI (__stdcall rather than __cdecl):
DWORD WINAPI MyFunc(LPVOID param);
2. You should not have to cast MyFunc to pass it to CreateThread()! The function signatures should match if MyFunc is declared properly.

3. You may want to use the CRT function _beginthreadex() instead of CreateThread(). I believe it avoids some handle leaks. In this case, to avoid return type mismatch, your thread routine should be declared and defined:
unsigned __stdcall MyFunc(void *param);
or
unsigned WINAPI MyFunc(LPVOID param);
Because the skin framework hooks various Windows API functions, probably including CreateThread, it may bring this coding error to light, while without skinning nothing bad occurs.

I hope this helps!


Back to Top
coolvicki7 View Drop Down
Groupie
Groupie


Joined: 12 June 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolvicki7 Quote  Post ReplyReply Direct Link To This Post Posted: 17 June 2008 at 2:20am

Yes this might be a reason for skin framework error... nice notes... thanks.

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