Page 1 of 1

LegendPaletteTool Pointer

Posted: Thu Jul 03, 2008 10:33 pm
by 15049432
Using v8 & VC6 I cannot get a usable pointer to a legend palette tool, whether I add the tool at design time or in code:

Code: Select all

// Add chart tools
long lToolCount = 0;
m_Chart.GetTools().Add(tcRotate);
lToolCount++;

m_Chart.GetTools().Add(tcLegendPalette);
CLegendPaletteTool lp = m_Chart.GetTools().GetItems(lToolCount).GetAsLegendPalette();
lp.SetSeries(m_vSurfaceSeries);
lp.GetPen().SetVisible(FALSE);
lp.SetSmooth(TRUE);
lp.SetAxis(laBoth);
lp.SetLeft(m_Chart.GetCanvas().GetWidth() - lp.GetWidth() - 10);
In the code above, I get lp, but if I try to access any properties or methods I get an access violation.

Are the interface files distributed with v8 upto date?

(I've already found one instance where they weren't, namely that

Code: Select all

const unsigned long cssScopeOnly = 4;
is missing from teechartdefines.h)

Posted: Tue Jul 08, 2008 10:38 am
by narcis
Hi LVL,

We have just posted TeeChart Pro v8.0.0.4 ActiveX at the client area and we thing this should work fine there. Could you please check if v8.0.0.4 solves the problem at your end?

Thanks in advance.

Posted: Wed Jul 09, 2008 2:53 am
by 15049432
Narcis,

Nope, doesn't help...same access violation crash with v8.0.0.4

Cheers

Posted: Thu Jul 10, 2008 4:23 pm
by narcis
Hi LVL,

Sorry, yes, you are right. A silly bug was still left. I'm goind to send you the unicode .ocx with the fix. You'll need to regenerate VC++ classes.

Posted: Thu Jul 10, 2008 10:13 pm
by 15049432
Hi Narcis,

Thanks for sending me the unicode OCX, it solves the problem!