Embedding a component

If you revisit the illustration of the compound document in Figure 62, you will note that the compound document is, at a minimum, a document with a single embedded document component. The compound document keeps a reference to its embedded document component and when necessary has the component create a presentation of the component's contained data.

Document components are stored in models (except the root document component). When a document component is added to the tree of document components, it is actually embedded in the model of the containing component.


You embed a document component when you attach it to a hierarchy managed by a document (use TModel::AddComponent). The compound document manages this hierarchy of components, ensuring that models (and their contained data) are easily accessible.

In a more complex compound document you would have more than one component. The second component in the embedding hierarchy is embedded within the model found in the first component.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker