Platform SDK: CDO 1.2.1 |
Objects in the CDO Rendering Library can be classified as top-level objects, child objects, and collections. A top-level object is one that can be created directly by your code, without having to derive it from any other object. A child object is one that must be derived from another object, for example by an Add method. A collection is a group of objects of the same type.
Currently, the top-level CDO Rendering objects are the RenderingApplication, ContainerRenderer, and ObjectRenderer objects. Other objects are accessible only through these top-level objects.
You can create a RenderingApplication object either through early binding:
Dim objRendApp As RenderingApplication Set objRendApp = CreateObject ("AMHTML.Application")
or through late binding:
Dim objRendApp As Object Set objRendApp = CreateObject ("AMHTML.Application")
and then later on use the CreateRenderer method to create specific rendering objects.
C/C++ programmers use globally unique identifiers (GUIDs) for these objects, defined in the type library for the CDO Rendering Library. The following table lists the GUIDs for the top-level objects accessible to C/C++ programmers. Note the close relationship; only the fourth of the 16 bytes differs among the GUIDs.
CDO Rendering Library object | GUID |
---|---|
RenderingApplication | {BC00F701-31AC-11D0-B5F1-00AA00BF3382} |
ContainerRenderer | {BC00F703-31AC-11D0-B5F1-00AA00BF3382} |
ObjectRenderer | {BC00F702-31AC-11D0-B5F1-00AA00BF3382} |
All CDO Rendering Library objects can be considered as relative to a RenderingApplication object. A rendering application's immediate child objects are the ContainerRenderer object and the ObjectRenderer object. These have their own child objects, which in turn have child objects, and so on. See the Rendering Object Model diagram for the logical hierarchy of the CDO Rendering Library.
The object hierarchy is important because it determines the correct syntax to use in your Microsoft® Visual Basic® applications. In your Visual Basic code, the relationship between a parent object and a child object is denoted by the left-to-right sequence of the objects in the Visual Basic statement. For example,
objContRend.Formats.Item(2)
refers to the second Format object in the Formats collection of the current ContainerRenderer object.