Number Format

TeeChart for ActiveX, COM and ASP
Post Reply
Gottkehaskamp
Newbie
Newbie
Posts: 5
Joined: Fri Aug 02, 2013 12:00 am

Number Format

Post by Gottkehaskamp » Sun Jul 27, 2014 11:56 am

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?

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: Number Format

Post by Pep » Mon Jul 28, 2014 8:16 am

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

Gottkehaskamp
Newbie
Newbie
Posts: 5
Joined: Fri Aug 02, 2013 12:00 am

Re: Number Format

Post by Gottkehaskamp » Mon Jul 28, 2014 5:18 pm

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?

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: Number Format

Post by Pep » Tue Jul 29, 2014 8:56 am

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);
}

Gottkehaskamp
Newbie
Newbie
Posts: 5
Joined: Fri Aug 02, 2013 12:00 am

Re: Number Format

Post by Gottkehaskamp » Thu Jul 31, 2014 6:59 am

Yes, it works!

Thank you very much!

Raimund

Post Reply