User (Legacy) Posted October 28, 2002 Report Share Posted October 28, 2002 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 More sharing options...
User (Legacy) Posted October 28, 2002 Author Report Share Posted October 28, 2002 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 More sharing options...
User (Legacy) Posted October 28, 2002 Author Report Share Posted October 28, 2002 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 More sharing options...
Software FX Posted October 28, 2002 Report Share Posted October 28, 2002 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 More sharing options...
User (Legacy) Posted December 6, 2002 Author Report Share Posted December 6, 2002 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 More sharing options...
Software FX Posted December 6, 2002 Report Share Posted December 6, 2002 To export it to an Image control use the GetPicture method as follows: Set ImageControl.Picture = chart1.GetPicture(CHART_BITMAP) -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.