Edit the header file of your view class, and add the following line before the class declaration:
#include "Chart.h"This needs to be included in the header file since in the variable declaration, you'll add a reference to a chart object. In fact, do that now, and what you'll end up with is something that may look a little something like this:
#include "Chart.h" class CTestProjectView : public CView { protected: // create from serialization only CTestProjectView(); DECLARE_DYNCREATE(CTestProjectView) // Attributes public: CTestProjectDoc* GetDocument(); CXYChart m_Chart; // ... more declarations and stuff belowHere I've chosen to include an XY chart, but it could just as easily have been an Image Chart.