If you have CWGraph from Measurement Studio 1.0 or Measurement Studio 6.0, I suggest installing Measurement Studio for Visual C++ and using those classes instead of the wrappers that MFC automatically generates for ActiveX controls. Measurement Studio for Visual C++ contains MFC C++ classes that provide native C++ interfaces to the ActiveX UI controls and to several hardware APIs. It also contains a project wizard to create new projects that use Measurement Studio classes and an add-in that lets you add Measurement Studio support to existing projects.
For example, the Measurement Studio for Visual C++ equivalent to CWGraph is called CNiGraph, and it has the following PlotY methods:
CNiGraph::PlotY(double x, double y);
CNiGraph::PlotY(const CN
iMatrix& y, double xFirst, double xInc, bool plotPerRow);
CNiGraph::PlotY(const CNiMatrix& y, bool plotPerRow);
CNiGraph::PlotY(const CNiMatrix& y);
CNiGraph::PlotY(const CNiVector& y, double xFirst, double xInc);
CNiGraph::PlotY(const CNiVector& y, double xFirst);
CNiGraph::PlotY(const CNiVector& y);
As you can see, these methods use strongly-typed C++ types for parameters and make it very difficult, if not impossible, to get a bad data type error when using them.
- Elton