IOleObject::GetExtent
This method retrieves a running objects 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 objects 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 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 objects display space at the time the method is called but does not necessarily change the objects native size, as determined by its application.
Note This method must return the same size as DVASPECT_CONTENT for all the new aspects in DVASPECT2. IViewObject2::GetExtent must do the same thing.
If one of the new aspects is requested in dwAspect, this method can either fail or return the same rectangle as for the DVASPECT_CONTENT aspect.
Notes to Implementers
Implementation consists of filling the sizel structure with an objects height and width.
Requirements
| Runs on | Versions | Defined in | Include | Link to |
|---|---|---|---|---|
| Windows CE OS | 2.0 and later | Oleidl.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.