RMChart: Anyone have wrappers for the DLL?

RMChart: Anyone have wrappers for the DLL?

Postby Colin Wisbey » Mon May 21, 2007 1:57 am

I've been using RMChart successfully for some months and I highly recommend it. I've been using the OCX version (which works fine) but I would much prefer to use the DLL version.

Is there anyone who can provide me with FWH/xHarbour wrapper functions for the DLL version? (I just don't have the skills for doing such wrapper functions).

TIA.
Colin Wisbey
Colin Wisbey
 
Posts: 56
Joined: Mon Jul 03, 2006 2:34 am

Postby Colin Wisbey » Sat Mar 01, 2008 10:46 pm

Has anyone come up with wrappers for the RMChart DLL yet? The RMChart OCX works fine but I'd rather switch to just using the DLL (for ease of distribution / installation).

TIA
Col
Colin Wisbey
 
Posts: 56
Joined: Mon Jul 03, 2006 2:34 am

Postby Roger Seiler » Wed Mar 05, 2008 1:22 am

Colin,

Download RMC4FWH.ZIP from...

http://www.leadersoft.com/software/rmc4fwh.zip

This uses FWH's DLL32 command to call the Rmchart.dll functions.

The zip includes:

Rmc4fwh.prg
Rmchart.ch

...and a couple other vb and bcx files for reference (they served as the basis for this translation to FWH).

Not well tested, so not sure how well it work for you, but at least it should get you started.

- Roger
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Postby dutch » Wed Mar 05, 2008 3:03 am

Dear Roger,

May I have an example to use RMCHART.DLL? I've never used it but I'm guite interesting on it.

Regards,
Dutch
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Postby Colin Wisbey » Wed Mar 05, 2008 6:35 am

Many thanks, Roger. That's a big help for me.
Cheers,
Col
Colin Wisbey
 
Posts: 56
Joined: Mon Jul 03, 2006 2:34 am

Postby Roger Seiler » Wed Mar 05, 2008 2:17 pm

Colin and Dutch,

As you can see from the Rmc4Fwh.prg file, this implementation of Fivewin's DLL32 command is still a work in progress. Many of the DLL32 commands don't work yet (won't even compile!) because they include arrays that aren't yet handled correctly. Perhaps you can work on that part of it - I will work on some more myself when I have time. As yet, I don't have any working samples using Rmchart.dll - so this is REALLY a work in progress! But I'm sure it will work once the problem of how to handlle the arrays is solved correctly.

The array structures are all described in the commented-out VB code in the top third of the prg. I'm not sure how to "type" them in the command, because in the VB code they seem to have been given a type specification in a format not mentioned in the DLL32 documentation. In this case we get a name for the array "T" then "AS" then a name referring to the array's design, followed by PTR. I just can't seem to get that to work yet with Fivewin's DLL32.

Can someone with more experience with DLL32 give us some guidance on this?

Here is a sample of the code we're working with - first the VB-BSC original and then my translation to FWH:

VB-BSC original:

// Here is the layout of an array to be used, as defined in the
// original BSC code sample shipped with Rmchart:

' ***** RMC_AddCaptionI() *****
TYPE tRMC_CAPTION
nBackColor AS LONG
nTextColor AS LONG
nFontSize AS LONG
nIsBold AS LONG
sText[200] AS CHAR
END TYPE

// Here is how the function is stated in the BSC code:

DECLARE FUNCTION RMC_AddCaptionI LIB "RMCHART.DLL" ( _
nCtrlID AS LONG, _
nRegion AS LONG, _
T AS tRMC_CAPTION PTR _
) AS LONG

//--------------------------------------------

// Now for my translation of the above BSC function call to FWH,
// which does not work:

DLL32 FUNCTION RMC_AddCaptionI( ;
nCtrlID AS LONG, ;
nRegion AS LONG, ;
@T AS tRMC_CAPTION PTR ;
) AS LONG PASCAL LIB "RMCHART.DLL"

// ( tRMC_CAPTION, above, is a name representing the
// layout of the array.)
------------------------------------

Fivewin's DLL32 allows the following data types:

BYTE, CHAR WORD, BOOL, HANDLE, HWND, HDC LONG, STRING, LPSTR, PTR, DOUBLE

What is the correct way to use these types in order to translate the BSC code...

"T AS tRMC_CAPTION PTR"

into part of a Fivewin DLL32 command?

If we can figure this out, then I should be able to quickly fix all 130+ of the Rmchart DLL32 function calls so that they will work.

Then we should be able to dance nicely with Rmchart in Fivewin!

- Roger
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Postby Roger Seiler » Wed Mar 05, 2008 2:54 pm

Incidentally, to get a good overview of the awesome power of the FREE Rmchart graphics toolset, go to the Rmchart website at:

http://rmchart.com

If we can get Rfc4Fwh.prg working correctly with Rmchart.dll with FiveWin's DLL32 command, it should be one more important benefit for FiveWin users.

- Roger
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Postby Roger Seiler » Wed Mar 05, 2008 3:31 pm

Here's a screenshot showing a sample of some of the graphing capabilities of RmChart. You can download RmChart for free from RmChart.com, including the RMCDesigner.exe - which enables you to see about 40 examples of different kinds of charts in the demo files.

It also allows graphic transparency so you can have some nifty photo in the background, like a pix of January 20, 2009 when the new U.S. President &*(%$# takes the oath of office in Washington. (Why did my keyboard suddenly go haywire when I tried to type in the name? Must be a virus.)

Image
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Postby Roger Seiler » Sun Mar 09, 2008 3:28 pm

To get samples of Rmchart use for both OCX and DLL, download the following file...

http://www.leadersoft.com/software/rmc4fwh.zip

(Colin - this has a first pass at what you want for DLL usage of Rmchart. More later.)

- Roger
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 65 guests

cron