Index   Commented   Search   About

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

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun