|
Chart Director 4 headers for C and Basic |
Posted by Paul Dwyer on May-16-2005 15:15 |
|
I am using PowerBasic and would like to ChartDirector. The COM implementation in PB is a little clunky so if possibly I would like to just do this with C style DLL calls.
The powerbasic language, like ANSI C does not support objects but can handle pointer, function pointer etc for calling the win32api.
I would like to build a header file for PowerBasic which I could could probably do if there were standard C header files to work from but I have only seen OOP examples so far.
I see some people here have used chartdir with C but I'm not sure how they got up and running.
Any pointers in the right direction would be helpful |
Re: Chart Director 4 headers for C and Basic |
Posted by Peter Kwan on May-16-2005 19:14 |
|
Hi Paul,
The ChartDirector C++ interface (implemented in "chartdir.h") actually is just a wrapper on the C interface (declared in "bchartdir.h"). The real ChartDirector DLL only has a C interface, but the C interface is not documented. Although in practice the C interface is stable for the last 2 years, we cannot guarantee that we will not change it in future versions of ChartDirector.
I only remember two persons who has tried to use the C interface by reading the C++ interface header and figure out the equivalent C interface. (I think they are to interface with SmallTalk and CodeWorker respectively.) You may try the same approach.
Another approach is to write a C wrapper yourself on top of the well-documented C++ interface. This will ensure future compatibility because we always ensure our documented interface are backward compatible.
Regards
Peter Kwan |
Re: Chart Director 4 headers for C and Basic |
Posted by Mike Linacre on May-20-2012 07:30 |
|
Has anyone used ChartDirector graphing successfully with PowerBasic? How was it done? |
Re: Chart Director 4 headers for C and Basic |
Posted by Maxx on May-22-2012 20:51 |
|
Hi Mike,
I presume you are just talking about generating charts with PB and not embedding a control
into your windows program (?)
If you want to use the .dll directly then you would need to convert the c++ headers to
Powerbasic and include that in your program, you can then call the functions directly from
your code. Your best bet here is probably to contact Paul Dwyer to see if he has already
done this.
The other way of doing this is to use the COM version of ChartDirector if you are
comfortably with doing so.
I have attached a simple example to get you started.
The include file was simply generated using the COM Browser.
I hope that will help,
Cheers
|
Re: Chart Director 4 headers for C and Basic |
Posted by Mike Linacre on May-23-2012 07:36 |
|
Thank you, Maxx, for the PowerBasic COM code.
Am also asking about ChartDirector on PowerBasic's Forums. They have told me how to link to the ChartDirector C++ .dll, so it looks like I will also be able to action a ChartViewer control in PowerBasic.
So my next challenge is to rewrite mfcdemo in PowerBasic |
|