IViewObject2 interface
An extension to the IViewObject interface which returns the size of the drawing for a given view of an object. You can prevent the object from being run if it isn't already running by calling this method instead of IOleObject::GetExtent.
Like the IViewObject interface, IViewObject2 cannot be marshaled to another process. This is because device contexts are only effective in the context of one process.
The OLE-provided default implementation provides the size of the object in the cache.
When to implement
Object handlers and in-process servers that manage their own presentations implement IViewObject2 for use by compound document containers.
When to use
A container application or object handler calls the IOleObject::GetExtent method in the IViewObject2 interface to get the object's size from its cache.
Members
The IViewObject2 interface inherits from IViewObject. IViewObject2 also has these types of members:
Methods
The IViewObject2 interface has these methods.
| Method | Description |
|---|---|
| GetExtent |
Retrieves the size of the view object from the cache. |
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
IID |
IID_IViewObject2 is defined as 00000127-0000-0000-C000-000000000046 |
See also