Jump to content
Software FX Community

Re: Saving the chart template to an OLE file, using the IPersistStreamInit interface

User (Legacy)

Recommended Posts

Strike this...I have determined that the Filemask property of the chart is

taken into account when this interface is used. Hence I do not need the

export command.


"Abram Krebs" <duckwood@erols.com> wrote in message


> Hi,


> I know that the Export method from the IDispatch interface can be utilized

> to save a template of the chart without the data. My question, is that I


> using the IPersistStreamInit interface to save the chart, and I was

> wondering how I could go about eliminating the data in this method.


> A snippet of my code is shown below...do I need to call the Export method,

> or is there another interface I need to use?



> IPersistStorage *pIPS;

> IPersistStreamInit *pIPSI;


> hr = pObject->QueryInterface(IID_IPersistStorage,(void **)&pIPS);

> if (SUCCEEDED(hr))


> hr = pIPS->QueryInterface(IID_IPersistStreamInit,(void

> **)&pIPSI);

> pIPS->Release();

> if (SUCCEEDED(hr)) {

> CLSID clsID;

> hr = pIPSI->GetClassID(&clsID);

> hr = WriteClassStm(pStream, clsID);

> hr = pIPSI->Save(pStream, TRUE);

> pIPSI->Release();


> }

> }

> pStream->Release();

> return hr;


> Thanks

> Abe Krebs



Link to comment
Share on other sites


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

  • Create New...