Page 1 of 1

Number Format

Posted: Sun Jul 27, 2014 11:56 am
by 16666668
Hello,

I need to force teeChart to use the english number format 123.456 ("." is the decimal point) instead of the german 123,456 where "," ist the decimal point. This should be done regardles of the enviroment settings of the computer.

I use the "OnGetAxisLabelTchart1(...)" event to do this:

Code: Select all

void CPlotView::OnGetAxisLabelTchart1(long Axis, long SeriesIndex, long ValueIndex, BSTR* LabelText)
{
	BSTR d=L"12.3";  // only for testing
	*LabelText = d;
}
But every time I change the LabelText I get the error message that there are problems with the heap.

Is the any way to fix it or another possibility to cange the number format regardless of the enviroment settings of the PC?

Re: Number Format

Posted: Mon Jul 28, 2014 8:16 am
by Pep
Hello,

please take a look at the following post and if you still having problems let us know.

You could give a try at the explained here:
http://www.teechart.net/support/viewtop ... f=1&t=8478

Re: Number Format

Posted: Mon Jul 28, 2014 5:18 pm
by 16666668
Yes I know the topic you refered and i tried to do exacly the same but in C++ for ActiveX. The problem is, that I get an error message, that the heap is damaged when I change the LabelText with my Cod above.

Maby I do something wrong in my Code, but I do not know what?

Re: Number Format

Posted: Tue Jul 29, 2014 8:56 am
by Pep
Hello,

what about using similar code to the following one for the OnMarkTipToolGetText ?
Using same code to set custom axis label text should work fine.

Code: Select all

void CVCplus60TESTAXv6Dlg::OnOnMarkTipToolGetTextTchart1(long Tool, BSTR FAR* Text) 
{
   CString strLabel(*Text);
   strLabel += " custom";
   strLabel.SetSysString(Text);
}

Re: Number Format

Posted: Thu Jul 31, 2014 6:59 am
by 16666668
Yes, it works!

Thank you very much!

Raimund