Compartir a través de


IOleObject::GetExtent (Windows CE 5.0)

Send Feedback

This method retrieves a running object's current display size.

HRESULT GetExtent( DWORD dwDrawAspect, SIZEL* psizel);

Parameters

  • dwDrawAspect
    [in] Specifies 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] Pointer to where the object's size is to be returned.

Return Values

This method supports the standard return value E_INVALIDARG, as well as S_OK, which indicates the extent information successfully returned.

Remarks

A container calls GetExtent on a running object to retrieve its current display size.

If the container can accommodate that size, it normally does so because the object 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 GetExtent might 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.

This method must return the same size as DVASPECT_CONTENT for all new aspects in DVASPECT2. IViewObject2::GetExtent must do the same thing.

If one a new aspect is requested in dwAspect, this method can fail or return the same rectangle as for the DVASPECT_CONTENT aspect.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Notes to Implementers

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

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oleidl.h, Oleidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.

See Also

IOleObject::SetExtent

See Also

IOleObject | Determining Supported COM APIs | DVASPECT | DVASPECT2 | IOleObject::SetExtent | IViewObject2::GetExtent

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.