/*
   Class RMChartX  (for OCX version of RMChart)
   Lira Lira Oscar Joel [oSkAr]
   oscarlira78@hotmail.com
   http://oskar.sytes.net
   Junio del 2006
*/                  (NOTE: English translation below.)

Para correr esta aplicacion debes de tener instalado el ocx
para instalarlo puedes bajar el instalador de la siguiente direccion
http://rmchart.com/rmc/downloads/setup/setup.exe o bien puedes
registrarlo manualmente copiando los archivos RMChart.ocx y RMChart.dll
de la carpeta utils a c:\windows\system32 ( cambia c:\windows por
tu carpeta de instalacion de windows ) y luego ejecuta el siguiente
comando regsvr32 RMChart.ocx, con eso el control quedara listo para
usarse

Nota: si quieres correr tu aplicacion sobre windows 98/ME/2000 debes
de poner la dll gdiplus.dll que se encuentra en utils\W9X2K en el
directorio de tu app

Les recuerdo que el ocx es freeware, en la licencia lo unico que el autor pide
es que si utilizas este control en tu app, en alguna parte de ella hagas mencion
de que estas usando su control, yo creo que es muy justo por la calidad del mismo

Los archivos con extencion RMC los pueden crear con el RMCDesigner que viene incluido si
instalan el ocx con el setup que se baja de la pagina del autor del ocx htp://rmchart.com


dudas y comentarios en http://oskar.sytes.net

*---English translation:

To use this application you must have the ocx installed.
To install it you can download it from the following web location:
http: // rmchart.com/rmc/downloads/setup/setup.exe 
or you can register it manually by copying the files RMChart.ocx and RMChart.dll
from the folder utils to c:\windows\system32 (for 32 bits the location for installation 
changes from c:\windows) and then execute the following command:

 regsvr32 RMChart.ocx

With that entry in the Windows registry, the control will be ready to be used.


Note: if you want to run your application on windows 98/ME/2000 then you should
put the dll gdiplus.dll from utils\W9X2K into your app's directory.

I remind you that the ocx is freeware, and in the license the only thing that the author 
(Rainer Morgen) asks is that if you use this control in your app, then in some part of it 
you should give him credit, stating that you are using his control. I believe that this 
is very fair considering the quality of this tool. 

Graph/chart files with extension RMC can be created with the RMCDesigner.exe that is 
included with the Rmchart package. If users install the ocx with the auto-setup, that 
includes a credit page for the author/source of the ocx: htp://rmchart.com

The Author of RMChart (our benefactor!): Rainer Morgen, Frankfurt, Germany RM@RMChart.com

For questions and comments on this particular implementation: http://oskar.sytes.net

--------------------------------------------------------------------------------------------
What's New:

20060703
- Nuevos metodo cRMColor( nR, nG, nB ), que devuelve un string con un color valido para rmchart
- Fix. ahora el metodo arraytostring() soporta datos numericos y caracteres

> New method CRMColor( nR, nG, nB ), that returns a string with a valid color for rmchart
> Fix. Now the method arraytostring() supports both numeric and character dates.

20060701
- ahora la clase es totalmente compatible con harbour, para usarse con harbour requiere
  la clase HBOle de JF. Jimenez
- Se hacen adaptaciones al metodo Error() para compatibilidad con Harbour
- Se Crea el Metodo RMCFile, ya que sin este harbour marcaba un error cuando xHarbour
  no se quejaba

> Now the class is totally compatible with Harbour, but to use with Harbour it requires
  the class HBOle of JF. Jimenez.
> We made adaptations of the method Error() for compatibility with Harbour.
> The method RMCFile was created, since without this Harbour was making an error even though 
  xHarbour was not complaining.

20060629
- Los menjajes que son pasados al objeto Chartx son redireccionados al objeto OLE
- Se Agrega un metodo ArrayToString( aDatos ) que lo que hace es generarnos el stringdata
  para pasar la serie de valores al RMChart
- Se Agrega compatibilidad para que el control pueda ser creado desde dialogos y recursos
  cuando se trate de dialogos todos los metodos y propiedades del control chart deben de
  ser llamados en el on init, antes de llamar a cualquier metodo o propiedad debemos de
  activar el control con Activate()

> The messages that are sent to the object Chartx are redirected to the object OLE
> We added a method ArrayToString(aDatos). What it does is to generate the stringdata
  to send the series of values to the RMChart.
> We added compatibility so that the control could be created from dialogues and resources.
  When it is a question, all the methods of dialogs and properties of the control  
  have to be set on init. Before calling to any method or property, we have to activate 
  the control with Activate().

  ejemplo...  (example...)

  //Dialogos Normales (Normal Dialogs)

  Define Dialog oDlg

     oChart := TRMChart():New( oDlg )

  Activate Dialog oDlg On Init Configura( oChart )
  Return NIL
  -----------------------------------------------------------------

  Function Configura( oChart )

     //Activamos el control
     oChart:Activate()

     //Ahora si Comenzamos a modificar el control
     oChart:RMFile( cFile )

  Return NIL

  ----------------------------------------------------------------
  //Recursos

   Define Dialog oDlg Resource "DL_CHART"

      //Le pasamos como segundo parametro el id del control
      oChart:TRMChart():New( oDlg, 101 )

   Activate Dialog oDlg On Init Configura( oChart )
   Return NIL

- Ahora el control antes de iniciarse verifica que el ocx este instalado, en caso de no
  estar pregunta si deseas instalarlo, para que la clase lo pueda instalar necesitas tener
  en el directorio de la app una carpeta que se llame RMCHART y dentro de ella 2 archivos
  rmchartx.ocx y rmchart.dll, dentro de la carpeta RMCHART debes de tener otra carpeta que
  se llame W9X2K con la dll gdiplus.dll. el metodo verifica devuelve un valor logico que
  indica si esta o no instalado el control

> Now the control, before beginning, verifies that the ocx is installed. If not, it asks
  if you want to install it. In order to enable the install of the OCX, you need to have
  in the app directory a folder that is called RMCHART, and inside of it must be the 2 files
  rmchartx.ocx and rmchart.dll. Inside the folder RMCHART you must have another folder that
  is called W9X2K with the dll gdiplus.dll. The method verifies it and returns a logical 
  value that indicates if it has or hasn't installed the control.