Jump to content
Software FX Community

How do I Export a template to and OLE stream under vc++?


User (Legacy)

Recommended Posts

Oh and how to get it back out of that stream that I saved it to....

-Mac

"Mac Dyer" <dyermac@hotmail.com> wrote in message

news:sKYDZBpfCHA.392@webserver1.softwarefx.com...

> Hi,

> I'm trying to save chartfx objecct I would prefer not to export it to

a

> file. Is there a place that I could see a sample of how to do this under

> VC++? Thanks.

> -Mac

>

>

Link to comment
Share on other sites

What type of interface needs to go into the variant passed to the export

function....IStream...ISequentialStream....something else?

"Mac Dyer" <dyermac@hotmail.com> wrote in message

news:sKYDZBpfCHA.392@webserver1.softwarefx.com...

> Hi,

> I'm trying to save chartfx objecct I would prefer not to export it to

a

> file. Is there a place that I could see a sample of how to do this under

> VC++? Thanks.

> -Mac

>

>

Link to comment
Share on other sites

This is an example:

To Export it:

CreateStreamOnHGlobal(NULL,false,&m_Stm); // This sample creates a memory

stream but it can be any type of stream

long lResult;

VARIANT v;

V_VT(&v) = VT_STREAM;

V_UNKNOWN(&v) = m_Stm;

m_pChartFX->raw_Export(CHART_CFXFILE,v,&lResult);

To re-import it:

LARGE_INTEGER li;

li.QuadPart = 0;

ULARGE_INTEGER lu;

m_Stm->Seek(li,STREAM_SEEK_SET,&lu); // Make sure the stream is positioned

to where the chart is saved

long lResult;

VARIANT v;

V_VT(&v) = VT_STREAM;

V_UNKNOWN(&v) = m_Stm;

m_pChartFX->raw_Import(CHART_CFXFILE,v,&lResult);

--

FP

Software FX, Inc.

Link to comment
Share on other sites

  • 1 month later...

Can you please send me the sample code in VB for the same problem?

I am using ChartFX in VB 6.0 and want to export chart to an Image control

without using file or clipboard.

Thanks,

Piyush Gupta.

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

news:ClvzeAtfCHA.3208@webserver1.softwarefx.com...

> This is an example:

>

> To Export it:

>

> CreateStreamOnHGlobal(NULL,false,&m_Stm); // This sample creates a

memory

> stream but it can be any type of stream

> long lResult;

> VARIANT v;

> V_VT(&v) = VT_STREAM;

> V_UNKNOWN(&v) = m_Stm;

> m_pChartFX->raw_Export(CHART_CFXFILE,v,&lResult);

>

> To re-import it:

>

> LARGE_INTEGER li;

> li.QuadPart = 0;

> ULARGE_INTEGER lu;

> m_Stm->Seek(li,STREAM_SEEK_SET,&lu); // Make sure the stream is

positioned

> to where the chart is saved

>

> long lResult;

> VARIANT v;

> V_VT(&v) = VT_STREAM;

> V_UNKNOWN(&v) = m_Stm;

> m_pChartFX->raw_Import(CHART_CFXFILE,v,&lResult);

>

> --

> 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...