Index   Commented   Search   About

IOleObject::GetExtent

Retrieves a running object's current display size.

HRESULT GetExtent(

DWORD dwDrawAspect,
//Value indicating object aspect
SIZEL *psizel
//Pointer to storage of object size limit
);

Parameters

dwDrawAspect

[in] Describes the aspect of the object whose limit is to be retrieved; the value is obtained from the enumeration DVASPECT. The most common value for this method is DVASPECT_CONTENT, which specifies a full rendering of the object within its container.

psizel

[out] Points to where the object's size is to be returned.

Return Values

S_OK

Extent information successfully returned.

E_INVALIDARG

Invalid value for dwAspect.

Comments

A container calls IOleObject::GetExtent on a running object to retrieve its current display size. If the container can accommodate that size, it will normally do so because the object, after all, knows what size it should be better than the container does. A container normally makes this call as part of initializing an object.

The display size returned by IOleObject::GetExtent may differ from the size last set by IOleObject::SetExtent because the latter method dictates the object's display space at the time the method is called but does not necessarily change the object's native size, as determined by its application.

Notes to Callers

Because a container can make this call only to a running object, the container must instead call IViewObject2::GetExtent if it wants to get the display size of a loaded object from its cache.

Notes to Implementors

Implementation consists of filling the sizel structure with an object's height and width.

See Also

IOleObject::SetExtent, IViewObject2::GetExtent

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