IViewObject2::GetExtent
Returns the size that the specified view object will be drawn on the specified
target device.
HRESULT GetExtent(
DWORD dwAspect,
| //Specifies the view object for which the size is being requested
|
DWORD lindex,
| //Specifies the part of the object to draw
|
DVTARGETDEVICE ptd,
| //Specifies the target device in a structure
|
LPSIZEL lpsizel
| //Points to size of object
|
);
|
|
Parameters
dwAspect
[in]Specifies the requested view of the object whose size is of interest.
Valid values are taken from the enumeration
DVASPECT. See the
DVASPECT enumeration for more information.
lindex
[in]Indicates the portion of the object that is of interest. Currently only -1
is valid.
ptd
[in]Points to the target device for which the object's size should be returned.
lpsizel
Points to location where the object's size is returned.
Return Values
S_OK
The object's extent was successfully returned.
OLE_E_BLANK
An appropriate cache is not available.
E_OUTOFMEMORY
Insufficient memory to execute this operation.
Comments
The OLE-provided implementation of
IViewObject2::GetExtent searches the cache for the size of the view object.
The
GetExtent method in the
IOleObject interface provides some of the same information as
IViewObject2::GetExtent.
Note to Callers
To prevent the object from being run if it isn't already running, you can call
IViewObject2::GetExtent rather than
IOleObject::GetExtent to determine the size of the presentation to be drawn.
See Also
IOleObject::GetExtent,
IViewObject
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database