Jump to content
Software FX Community

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


User (Legacy)
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...