Jump to content
Software FX Community

Getting and setting number of series and values


User (Legacy)

Recommended Posts

Hi, 

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

is

CATCH_ALL(e)

{

lResult = AfxGetThread()->ProcessWndProcException(e,

&pThreadState->m_lastSentMsg);

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

lResult);

DELETE_EXCEPTION(e);

}

END_CATCH_ALL

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

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

Thanks,

Arjun Bangalore

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...