Jump to content
Software FX Community

Multiple imports of the same template.

User (Legacy)

Recommended Posts

Is there any reason I can't import the same template into more than one 


For instance, I've got the following code:

// pChart1 and pChart2 are valid ChartFX IChartFX pointers (the objects

already exist.)

// pStream is an IStream* which contains a previously

// exported CHART_CFXOLETEMPLATE stream.

long nRetVal = 0;

// Copy the stream into variant.

VARIANT vChartFXTemplate;


V_VT(&vChartFXTemplate) = VT_STREAM;

V_UNKNOWN(&vChartFXTemplate) = pStream;

pChart1->raw_Import(CHART_CFXOLETEMPLATE, vChartFXTemplate, &nRetVal);

pChart2->raw_Import(CHART_CFXOLETEMPLATE, vChartFXTemplate, &nRetVal);

Now when I display pChart1 and pChart2, only pChart1 has the template

applied to it and pChart2 shows the default properties. The returned HRESULT

is S_OK for both calls, and nRetVal is 0 for both calls.



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.

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.


  • Create New...