Working with streams.

S

soso

Was anybody able creating a new Shape from a stream? All constructors
for Masters, Shapes, Pages etc. are private and can’t be used directly.
Graham talk about “Visio XML” and IDataObject interface usage for the object
creation, is it actually works? I didn’t found any mentioning about work
with streams in SDK 2003.

Thank you,

soso.
 
M

Mai-lan [MS]

Visio programming is file-based and not stream-based so you won't see
material in the SDK for it.

You can use ISerializable if you wanted to save your drawing as a blob in a
database as opposed to on the file system.

With the ActiveX control, if you use IPersistStreamInit or IPersistStorage,
you can save control instances out with their drawings embedded in them with
or without a SRC property. However, if there is a SRC file and it can be
loaded at control load time, then the contents of that SRC file will replace
the persisted contents of the contained drawing that were loaded from the
stream or storage. If you want your persisted stream-based object to come
back reliably, make sure the SRC property is set to the empty string prior
to persisting it out.

Thanks,
Mai-lan

Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

soso

Hi Mai-lan.

Thanks a lot for your advise!
soso.

Mai-lan said:
Visio programming is file-based and not stream-based so you won't see
material in the SDK for it.

You can use ISerializable if you wanted to save your drawing as a blob in a
database as opposed to on the file system.

With the ActiveX control, if you use IPersistStreamInit or IPersistStorage,
you can save control instances out with their drawings embedded in them with
or without a SRC property. However, if there is a SRC file and it can be
loaded at control load time, then the contents of that SRC file will replace
the persisted contents of the contained drawing that were loaded from the
stream or storage. If you want your persisted stream-based object to come
back reliably, make sure the SRC property is set to the empty string prior
to persisting it out.

Thanks,
Mai-lan

Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top