|
int DPlot_PlotToRect(DPLOT *DPlot, float *array1, float *array2, LPSTR commands, HWND hwnd, RECT *rc);
int DPlot_PlotToRect8(DPLOT *DPlot, double *array1, double *array2, LPSTR commands, HWND hwnd, RECT *rc);
Parameters
*DPlot | Address of a DPLOT structure. A DPLOT structure contains format information for the graph: number of curves, number of points in each curve, line and symbol styles used, etc. This structure is defined in the header/include file accompanying the various source examples. |
*array1 | Address of the X array for XY plots or a 4-element array used for the extents of a contour plot on a rectangular grid. Not used for contour plots of random points or 1D plots. |
*array2 | Address of the Y array for XY plots,
Z array for contour plots on a rectangular grid,
X,Y,Z triplets (in the order x(0),y(0),z(0),x(1),y(1),z(1),... etc.) for contour plots of randomly-spaced points.
Y (amplitude) array for box-and-whisker plots and dot graphs. |
commands | Character string with zero or more DPlot commands. Valid commands and the syntax for those commands are described in the DPlot Command Syntax section of DPlot's Help file. This string is limited to 32768 characters and must be null-terminated. |
hwnd | Handle of the window where the picture is to be drawn. |
*rc | Address of the rectangle where the picture is to be drawn, relative to the client area of hwnd. |
Return Values
>0 | Success. The return value in this case is the index of the document created by the call. This value will be between 1 and 32, inclusive. The document index may be used in subsequent calls to DPlot_Command and DPlot_Request. |
0 | Generic error attempting to communicate with DPlot. This most often indicates that DPlot is currently busy, e.g. a modal dialog box is open., or that one or more commands in the commands parameter is invalid. (In the latter case, DPlot will show an "Error processing this command" MessageBox. |
-1 | Could not find/execute DPlot. |
-2 | Could not establish a DDE connection with DPlot. This error should never occur. |
-3 | Invalid DataFormat type specified in the DPLOT structure. If you've filled out the structure correctly and get this error, it is most likely an indication that the structure is not being passed correctly. |
-4 | Unsupported version number in the DPLOT structure. Valid values are currently 2 and 3. |
Remarks
If DPlot was not running when DPlot_PlotToRect was called, this function will shut DPlot down immediately before returning to the caller. If this is undesirable (for example if your application will be making multiple calls to DPlot_PlotToRect functions), you should first start DPlot with DPlot_Start.
|
|