Jump to content
Software FX Community

Getting and setting number of series and values

User (Legacy)

Recommended Posts


I am evaluating ChartFX 98 (through the downloaded CfxIEDsgTrial.exe) for

use in MS Visual C++ application. I have added it as an ActiveX component

letting the wizard to create all the wrapper classes. I am using the

ActiveX component in a dialog box. I have created a member variable for the

ActiveX control in the class associated with the dialog box and using it to

access all the methods.

At the design time, the default number of series = 2 and number of points =

5. I am reading in data from a file (not using Data Provider, but using

simple opening the file and reading in the values into an array). I want to

dynamically set the number of series and number of values (points) depending

on the size of the array. I am trying to use GetNSeries,SetNSeries,

GetNValues, and SetNValues methods. Here is the code I am using.

long rows,cols;

rows = m_fxdlg.m_chartfx.GetNSeries();

sprintf(temp,"No. of Series: %d",rows);

MessageBox(temp,"Series ",MB_OK); // displays 2 - OK

m_fxdlg.m_chartfx.SetNSeries(nNumSamples); // Should set the number of

series = 11 as nNumSamples = 11

cols = m_fxdlg.m_chartfx.GetNSeries();

sprintf(temp,"No. of Columns: %d",cols);

MessageBox(temp,"Columns",MB_OK); // does not reach this statement

Running the debugger and getting into SetNSeries fuction, I can see that the

value 11 is being passed. However, the invokehelper function generates an

exception in WINCORE.CPP file. The exact code that is generating the error




lResult = AfxGetThread()->ProcessWndProcException(e,


TRACE1("Warning: Uncaught exception in WindowProc (returning %ld).\n",





What is happening here? Please explain in sufficient detail as I am fairly

new in using ActiveX components in Visuall C++ applications.


Arjun Bangalore

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...