| RMC_CreateChartFromFile function. | ||
| Create a new chart by reading a *.rmc-file or passing the data string. | ||
| Syntax | ||
| nResult (LONG) = RMC_CreateChartFromFile( ByVal nParentHndl (LONG), ByVal nCtrlId (LONG), ByVal nX (LONG), ByVal nY (LONG), ByVal nExportOnly (LONG), ByRef sRMCFile (ASCIIZ) ) |
||
| Parameter | ||
| nParentHndl (LONG) | ||
| Handle of the parent window (= the dialog), in which the chart will be shown. | ||
| nCtrlId (LONG) | ||
| Unique ID of the control. | ||
| nX (LONG) | ||
| Upper left corner of the chart in the parent window (in Pixel). | ||
| nY (LONG) | ||
| Top corner of the chart in the parent window (in Pixel). | ||
| nExportOnly (LONG) | ||
| If TRUE the chart cannot be displayed on the screen, it must be drawn with either RMC_Draw2File(), RMC_Draw2Printer() or RMC_Draw2Clipboard(). | ||
| sRMCFile (ASCIIZ) | ||
| Full name of a *.rmc-file which was created with
RMCDesigner or with RMC_WriteRMCFile().
OR: The content of such a file as plain data string. So you could save for example the data string in your EXE-file or in a resource-file instead of having several *.rmc-files along with your application. In the Designer you can copy the data string (besides the source code) of the chart you've designed into the clipboard. | ||
| Return value | ||
| 0 | ||
| No error, function succeeded. | ||
| RMC_ERROR_PARENTHANDLE | ||
| Parent handle is 0. | ||
| RMC_ERROR_CTRLID | ||
| Control ID is 0. | ||
| RMC_ERROR_MAXINST | ||
| The maximum count of control instances (20) within one programm is exceeded. | ||
| RMC_ERROR_NOGDIP | ||
| No GDIPLUS.DLL was found. | ||
| RMC_ERROR_CREATEWINDOW | ||
| Error while creating window with CREATEWINDOWEX. | ||
| RMC_ERROR_RMCFILE | ||
| Error opening sRMCFile. | ||
| Remarks | ||
|
Please see Concept of the RMC content string for a brief description of the concept of *.rmc-files.
If you need to know the width and height of the chart, which will be painted call RMC_GetChartsizeFromFile() before you create (or show) the chart. | ||