ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  is there something different for 3D?
Posted by jef on Dec-27-2024 05:02
Attachments:
I have "3D Scatter Chart (1)" works fine. I copied the snippet for "3D Scatter Groups" but when I go to display the chart inside my dialog like this:

    m_PlotPMResults.setChart(c);

I get an assertion error from ChartViewer.cpp line 818 (attached). Is there something different between 3D Scatter Chart vs. 3D Scatter Groups?
just wondering...
thanks
jef
3DScatterGrouperr.jpg

  Re: is there something different for 3D?
Posted by Peter Kwan on Dec-27-2024 13:27
Hi Jef,

In terms of displaying the chart, there is no difference between all chart types.

The line that triggers the error only have one function GetStyle that can crash. The GetStyle is a MFC CWnd function. It will crash if the CWnd is not correctly initialized (eg. it is not attached to a windows handle). To confirm, you may click "Show Call Stack" in the error message to verify if it is crashed somewhere within an MFC DLL.

If your Window is a CDialog, and you use the resource editor to set up the Dialog, the flow is usually as follows:

(a) The default OnInitDialog method will load the Dialog resources and initialize them. In practice, usually your code will override the OnInitDialog method. Please remember to call the base class implementation first.  It is something like " CDialog::OnInitDialog();" or "CDialogEx::OnInitDialog();" depending on your base class. It is not safe to use any MFC control before the initialization.

(b) There is usually a DoDataExchange method in the code. The resource editor will automatically insert code in DoDataExchange to bind the resource ID with the C++ member variable. This allows you use C++ to configure the control. Please double check if the binding is correct. Is the resource ID spelled correct? Is it a resource ID defined in the resource editor?

If this still cannot solve the problem, is it possible to create a simple project that can illustrate the problem (eg. by modifying the helloworld sample code until it crashes).

Best Regards
Peter Kwan