Samaya Posted April 3, 2008 Report Share Posted April 3, 2008 Hi! I am the new user of ChartFx Client server control. I have installed ChartFx Cleint Server 5.1 on my PC(Licenced version), now i am trying to write small MFC Dialog based application using Visual Studio 2005. I have registered "Cfx4032.ocx" and "sfxbar.dll" in my PC. and added the import directives as below - this is mentioned in ChartFx's programer guide. In your precompiled header (STDAFX.H) // DEFINITION of COM wrappers #import "sfxbar.dll" no_namespace no_implementation #import "Cfx4032.ocx" no_namespace no_implementation In your implementation (STDAFX.CPP) // IMPLEMENTATION of COM wrappers #import "sfxbar.dll" no_namespace implementation_only #import "Cfx4032.ocx" no_namespace implementation_only I am trying to run the sample application given in ChartFx installed folder(Cfx98 project) and this runs very well. Now i have copied the same code to my VC2005 project and this code compiles well only. If i run in debug mode, the application throws me an exception. i ahve no clues why thsi execption is ocurring, but my sample project runs fine. Any response would be of great help. Thanks,Samaya Quote Link to comment Share on other sites More sharing options...
Frank Posted April 3, 2008 Report Share Posted April 3, 2008 How did you create the Chart instance. Please post the relevant code or better yet the project that reproduces the problem. Quote Link to comment Share on other sites More sharing options...
Samaya Posted April 4, 2008 Author Report Share Posted April 4, 2008 Hello Thanks for your response! I have posted the code snippet below: I have craeted the pointer to the ChartControl as below - This is as given in the ChartFX Programmers guide. This code in my dialog header file CWnd m_ChartFX1; IChartFXPtr m_pChartFX1; In my DDX function i have the below code: DDX_Control(pDX, IDC_CHART1, m_ChartFX1); if (!pDX->m_bSaveAndValidate) { // Link Chart FX pointer to control windowm_pChartFX1 = m_ChartFX1.GetControlUnknown(); } Then i use m_pChartFX1 to call teh Chart control functions. Thanks. WebSite27.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.