Displaying a Chart in a Dialog Box or Form View
To use SREGraphView or SREScrollView in a CDialog or CFormview:
1. Declare a member variable (either a pointer or a variable, say m_myView) in your dialog or form view derivative.
2. In your OnInitDialog() or OnInitialUpdate() function, call the Create() function of SREGraphView or SREScrollView class passing it the rectangle in which the chart is to be displayed.
rc, this, ID_MYVIEW);
NOTE >> The rectangle should be specified in client coordinates.
3. For the SREScrollView class, call SetScrollSizes().
4. Set the m_pGraph pointer of the SREGraphView or SREScrollView class. Generally, we will set the m_pGraph pointer to an instance of SRGraph stored inside the dialog or form view class.
m_myView.m_pGraph = &m_Graph;