Hi,
I got problem with TeeChart v8 unicode version while migrating from v6.
When I set chart header or subheader with GetHeader().SetCaption(str) or GeSubtHeader().SetCaption(str), I get correct text in Japanese.
However when I use CStrings methods like
.GetHeader().GetText().Add(str) or .GetHeader().GetText().SetText(str),
TeeChart renders question marks.
And one more problem I have with call to .Series(i).GetAsLine().GetPointer().GetBrush(). It fails with message "Member not found".
Could you please suggest something on this problems?
I'm using VS c++ 2005, TeeChart v8.0.0.3 unicode version.
Unicode problem with TeeChart v8.0.0.3
Hi Studylog,
I've tested it for VB6 and I'm not able to reproduce it. Here is the code I used and works for me:
I'm sorry it's in VB6 not in c++ but you shouldn't have many troubles in translating.
So, could you please send us a simple example project (in c++ if you prefer) we can run "as-is" to reproduce your problem here?
I've tested it for VB6 and I'm not able to reproduce it. Here is the code I used and works for me:
Code: Select all
Private Sub Form_Load()
Dim mystring As String
TChart1.Aspect.View3D = False
mystring = TChart1.Environment.CodeUTF8String("EXAMPLE " & TChart1.Environment.DecodeUTF8String("@U#4558414D504C45"), True)
TChart1.Header.Caption = mystring
TChart1.SubHeader.Text.Add mystring
TChart1.Footer.Text.Text = mystring
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues 25
TChart1.Series(0).asLine.Pointer.Visible = True
TChart1.Series(0).asLine.Pointer.Brush.Style = bsDiagSmall
TChart1.Series(0).asLine.Pointer.Brush.Color = vbBlue
End Sub
So, could you please send us a simple example project (in c++ if you prefer) we can run "as-is" to reproduce your problem here?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Thanks Yeray,
CodeUTF8String() fixes problem with unicode text.
I was confused with its usage because Header.Caption produce correct result without UTF8 coding.
However problem with missing "GetBrush()" member still remains.
I've created test project using VisualStudio 2005 and wonder how I can send it to you. Would support@steema.com be correct address?
Basically you need only to create dialog based MFC application project,
Than add to dialog TeeChart control and try to use the following code:
where m_Chart is a CTChart variable bound to teechart control.
CodeUTF8String() fixes problem with unicode text.
I was confused with its usage because Header.Caption produce correct result without UTF8 coding.
However problem with missing "GetBrush()" member still remains.
I've created test project using VisualStudio 2005 and wonder how I can send it to you. Would support@steema.com be correct address?
Basically you need only to create dialog based MFC application project,
Than add to dialog TeeChart control and try to use the following code:
Code: Select all
m_Chart.AddSeries(scLine);
m_Chart.Series(0).FillSampleValues(25);
// This call returns "Member not found" error.
m_Chart.Series(0).GetAsLine().GetPointer().GetBrush();
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Studylog,
Have you added this line to your code?
Code snippet below works fine for us here using TeeChart Pro v8.0.0.3 ActiveX. Is that the version you are using?
Thanks in advance.
Have you added this line to your code?
Code: Select all
#include "Brush.h"
Code: Select all
m_Chart1.AddSeries(scLine);
m_Chart1.Series(1).FillSampleValues(10);
m_Chart1.Series(1).GetAsLine().GetPointer().GetBrush().ShowEditor();
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis,
Yes, I've included brush.h header.
And your test is correct. Exactly the same lines produce the exception I mentioned. Version also correct - 8.0.0.3.
I tried different combinations and different machines. Also I tested unicode, multi language unicode and regular versions. And all of them produce an error.
All I can think about is a mistake in the wrapper class.
Here is what I have in pointer.cpp:
Is it possible that method ID (0x1 in our case) is wrong?
By the way, when I investigated the problem I found that CPointer::GetTransparency() also produces the same error.
Yes, I've included brush.h header.
And your test is correct. Exactly the same lines produce the exception I mentioned. Version also correct - 8.0.0.3.
I tried different combinations and different machines. Also I tested unicode, multi language unicode and regular versions. And all of them produce an error.
All I can think about is a mistake in the wrapper class.
Here is what I have in pointer.cpp:
Code: Select all
CBrush1 CPointer::GetBrush()
{
LPDISPATCH pDispatch;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);
return CBrush1(pDispatch);
}
By the way, when I investigated the problem I found that CPointer::GetTransparency() also produces the same error.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Studylog,
I've just sent a working example at your forums contact e-mail address. Could you please check if it works fine at your end?
Thanks in advance.
I've just sent a working example at your forums contact e-mail address. Could you please check if it works fine at your end?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Your example works fine and do not produce mentioned error. Although the code is absolutely the same.
I've fixed the problem with my code by replacing the stub classes I took from
...\TeeChart Pro v8 ActiveX Control\Utilities\New VC Classes\
with classes from your example.
Also I had to use some files from the previous set because in the example some files was missing.
There were around 40 different files, so it's hard to say where was the problem.
And just to be sure I won't get any problems in the future, could you please send me a full set of stub classes?
I've fixed the problem with my code by replacing the stub classes I took from
...\TeeChart Pro v8 ActiveX Control\Utilities\New VC Classes\
with classes from your example.
Also I had to use some files from the previous set because in the example some files was missing.
There were around 40 different files, so it's hard to say where was the problem.
And just to be sure I won't get any problems in the future, could you please send me a full set of stub classes?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Studylog,
When creating a new project you can automatically generate new header files when dropping TeeChart components in a dialog. Anyway, we will make sure all header files are up to date in the next maintenance release.
When creating a new project you can automatically generate new header files when dropping TeeChart components in a dialog. Anyway, we will make sure all header files are up to date in the next maintenance release.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |