Click here to Skip to main content
15,036,363 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CChartStandardAxis* pBottomAxis =
CChartStandardAxis* pLeftAxis =

i wrote these in OnInitDialog() then build&excute,here is the problem,when my cursor moveover the custom control i get the following error
<img src="" alt="CEHirD.png" border="0" />

What I have tried:

after removing code about axes no error occurs
Updated 17-Apr-18 20:25pm

Please don't post links to images containing error messages. Just copy and paste the error text.

That your application crashes is probably not sourced by creating the axes. Without axes, you can not add data to the control. So when removing the code, later calls to add data will do nothing and the control is empty.

The solution to solve the problem is using a debug build of your application and the chart control and running that from the debugger step by step watching the debug window for trace messages. When the application stops check the call stack.

You may also comment out other portions of your code to know which might be involved.
I find the solution in the introduction of the control.
The control uses dynamic casts internally so RTTI (RunTime Type Information) must be enabled, otherwise a crash will probably occur. RTTI is not enabled by default for VC6, so to enable it open the project settings -> "C/C++" tab -> "C++ language" category and there make sure that the "Enable Run-Time Type Information (RTTI)" check-box is checked.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900