Dealing with images in VC++ is far from easy. You would need to create the following objects: CBitmap, CArchive, CPictureHolder and a CDC.
Then call the SelectObject function on the CDC and pass in the CBitmap object. Then you can put the image of the graph in the CPictureHolder with:
ph.SetPictureDispatch((LPPICTUREDISP)m_CWGraph.ControlImage().m_lpDispatch);
where ph is the CPictureHolder and m_CWGraph is the CWGraph.
Then you can render the image to the bitmap CDC by calling the CPictureHolder::Render function. It will ask for the bounds of the picture in CRect form as well.
Then you can call the CBitmap.Serialize function with the CArchive object which should be pointing to the appropriate BMP file. Don't you just love MFC?
As for you second qu
estion, you can't retrieve the data that has been plotted to the graph. We don't maintain the data that is sent in because it would be very inefficient memory usage since data is usually decimated for display. I would recommend that you just send your data to a global buffer at the same time as plotting.
Best Regards,
Chris Matthews
Measurement Studio Support Manager