Jump to content
Software FX Community

crash while get x,y title


User (Legacy)

Recommended Posts

I'm working on getting title of x and y axis. My program crashed when I use

the following code:

char XAxisTitle[64], YAxisTitle[64];

strcpy(XAxisTitle, m_pChartFX->Axis->Item[AXIS_X]->Title);

strcpy(YAxisTitle, m_pChartFX->Axis->Item[AXIS_Y]->Title);

What's wrong with my code? I'm not sure what kind of data type I should use

when I return the result of title.

Link to comment
Share on other sites

1. I'm using DLL.

2. The title of x, y axis is set as follows:

m_pChartFX->Axis->Item[AXIS_X]->Title = "MY X Title";

m_pChartFX->Axis->Item[AXIS_Y]->Title = "MY Y Title";

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:jpFT5FrxBHA.1412@webserver1.softwarefx.com...

> 1) Are you using the OCX or the DLL ?

> 2) How big is your title ?

>

> A title return a string (_bstr_t if you are using the OCX).

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

I changed my code as follows:

char XAxisTitle[256], YAxisTitle[256];

char *spX, *spY;

spX = XAxisTitle;

spY = YAxisTitle;

spX = m_pChartFX->Axis->Item[AXIS_X]->Title;

spY = m_pChartFX->Axis->Item[AXIS_Y]->Title;

MessageBox(NULL,XAxisTitle, " X title",MB_OK);

MessageBox(NULL,YAxisTitle, " Y title",MB_OK);

But the title of x or y axis that was displayed in the message box is not

the value I set. I don't know why.

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:1yua3ftxBHA.2504@webserver1.softwarefx.com...

> Ok. The DLL is a little different. Check the following KB article:

>

>

> Q1381049. Getting string properties using the DLL

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Just got the answer.

Two methods to use:

1.

m_pChartFX->get_Title(CHART_BOTTOMTIT, &spX);

m_pChartFX->get_Title(CHART_LEFTTIT, &spY);

2.

m_pChartFX->Axis->Item[AXIS_X]->get_Title(&spX);

m_pChartFX->Axis->Item[AXIS_Y]->get_Title(&spY);

"Danqing" <dhu@chemimage.com> wrote in message

news:GUkBWytxBHA.2652@webserver1.softwarefx.com...

> I changed my code as follows:

>

> char XAxisTitle[256], YAxisTitle[256];

>

> char *spX, *spY;

> spX = XAxisTitle;

> spY = YAxisTitle;

>

> spX = m_pChartFX->Axis->Item[AXIS_X]->Title;

> spY = m_pChartFX->Axis->Item[AXIS_Y]->Title;

>

> MessageBox(NULL,XAxisTitle, " X title",MB_OK);

> MessageBox(NULL,YAxisTitle, " Y title",MB_OK);

>

> But the title of x or y axis that was displayed in the message box is not

> the value I set. I don't know why.

>

>

>

> "SoftwareFX Support" <support@softwarefx.com> wrote in message

> news:1yua3ftxBHA.2504@webserver1.softwarefx.com...

> > Ok. The DLL is a little different. Check the following KB article:

> >

> >

> > Q1381049. Getting string properties using the DLL

> >

> > --

> > FP

> > Software FX, Inc.

> >

> >

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...