Add custom X-axis values via an event

Is it possible to get a translation of this advchart code snippet to C, as I can't get it work.
(the code which is given in this page
with thanks

There are many entries on this FAQ page,

what entry exactly are you referring to?

as I stated in the title of my post : Add custom X-axis values via an event


We have translated the code and uploaded a demo:

Kind Regards,

thanks for the answer. It does not work and I get this error message:
[BCC32 Erreur] Main.cpp(525): E2034 Impossible de convertir 'void (_fastcall * (_closure )(TObject *,TChartSerie *,TCanvas *,TRect &,int,int,bool,bool &))(TObject *,TChartSerie *,TCanvas *,TRect &,int,int,bool,bool &)' en 'TChartXAxisDrawValue'

Which C++Builder version are you using? It works as expected here in C++Builder XE3.

Please look at the definition in AdvChart.hpp to know how to construct the event handler:

This is the definition in AdvChart.hpp generated when building the packages in XE3

typedef void __fastcall (__closure TChartXAxisDrawValue)(System::TObject Sender, TChartSerie* Serie, Vcl::Graphics::TCanvas* Canvas, System::Types::TRect &ARect, int ValueIndex, int XMarker, bool Top, bool &defaultdraw);

hello again,
that did it, it was a bad definition. I use XE2.
thanks a lot
best regards