FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour to Stefan Haupt RMCHART
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
to Stefan Haupt RMCHART
Posted: Fri Mar 07, 2008 09:34 PM

I've looked carefully at the files within TRMchartX.zip from Oscar and Stefan, and unless I'm missing something, I don't see any C wrappers included for RMChart.dll. This set of files appears to be focused on a TRMChartX class in its TRMChartX.prg, which seems to only access the ActiveX capabilities of RMChart and Harbour -not the dll implementation. Of course, for many, the ActiveX route may be the best way to go.

But if one wants to use RMChart.dll, the approach that Im working on with DLL32 may be appropriate. Anyway, it's working here - though some additional cleanup is still needed with the functions that have arrays as parameters. Hope to have that finished tonight.

  • Roger
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
to Stefan Haupt RMCHART
Posted: Fri Mar 07, 2008 09:59 PM

It seems someone else using xHarbour (but not FWH) also had the problem passing arrays to the RMchart.dll functions - the problem I'm wrestling with - and he found a solution. However, I can't seem to get his solution to work in FWH. Can someone show me how?

Here's an exerpt of the discussion from the Rmchart forum...

*------------
I have a problem with RM_ADDBARSERIES .... I can't get the data array in ??? - ChrisG

aData := { 10.0, 20.0, 30.0, 40.0, 50.0 } // define my array of data

nResult := DLLCall( ;
hDll, ; // DLL to call
DC_CALL_STD, ; // calling convention
"RMC_ADDBARSERIES", ; // the function to call
nCtrlId, ;
1, ; //region
aData, ;
5, ; // length of data
0,0,0,0,0,0,0,0,0 )
I have tried it with aData, aData[1]

*------------
(LATER, HIS SOLUTION...)
A clever person on the xHarbour NG has given me some code that allowed me to do this...

typedef struct { DOUBLE nDouble[5] } MyStructure

PROCEDURE MakeData
LOCAL o IS MyStructure

o:nDouble[1] := 1.0
o:nDouble[2] := 2.0
o:nDouble[3] := 3.0
o:nDouble[4] := 4.0
o:nDouble[5] := 5.0

RETURN( o )

pragma ENDDUMP

I then pass o[1] into the Rmchart function .... and all works 100%.
*------------------------------------------

(Me again...)

I've tried, but haven't quite been able to implement this solution in FWH.
Any suggestions? (Come on Enrico - throw me a life preserver. You're so good at it!)

  • Roger
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
to Stefan Haupt RMCHART
Posted: Fri Mar 07, 2008 10:03 PM

Whoops - the #pragma ENDDUMP wasn't part of ChrisG's code - it's a fragment left over from my attempt to implement his solution. - Roger

Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
to Stefan Haupt RMCHART
Posted: Sat Mar 08, 2008 12:31 AM
Dear Stefan,

Yes, please.

Regards,
Dutch
dutchez4@gmail.com
dutch@easyfo.com
StefanHaupt wrote:Hi Dutch,

dutch wrote:Dear Stefan,

Could you give an example for How to use RMCHART.DLL wrapper (FWH code)? How to set the figures for graph?
Dutch


Please see my last post to Roger, I only have the sample which is included in the TRmChartX class.

Did you have the wrapper using ocx ? I can sent you the archiv file if you want.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
to Stefan Haupt RMCHART
Posted: Mon Mar 10, 2008 08:35 AM

Alfonso, Dutch,

just sent the file

kind regards

Stefan

Continue the discussion