IViewObjectEx::GetRect (Windows CE 5.0)

Send Feedback

This method returns a rectangle describing a requested drawing aspect.

HRESULT GetRect(DWORDdwAspect,LPRECTLpRect);

Parameters

  • dwAspect
    [in] Drawing aspect requested.
  • pRect
    [out] Pointer to the rectangle describing the requested drawing aspect.

Return Values

If the method succeeds, the return value is S_OK.

If DV_E_DVASPECT is returned, the method does not support the specified aspect. Either the object does not support the aspect requested or the aspect is not rectangular.

Remarks

This method returns a rectangle describing the specified drawing aspect. The returned rectangle is in HIMETRIC units, relative to the object's origin. The rectangle returned depends on the drawing aspect.

The following table shows the rectangle returned for each drawing aspect.

Value Description
DVASPECT_CONTENT Objects should return the bounding rectangle of the whole object. The top-left corner is at the object's origin and the size is equal to the extent returned by IViewObject2::GetExtent.
DVASPECT_OPAQUE Objects with a rectangular opaque region should return that rectangle. Others should fail and return error code DV_E_DVASPECT.

If a rectangle is returned, it is guaranteed to be completely obscured by calling the IViewObject::Draw method for that aspect.

The container should use that rectangle to clip out the object's opaque parts before drawing any object behind it during the back-to-front pass.

If this method fails on an object with a non-rectangular opaque region, the container should draw the entire object in the back-to-front part using the DVASPECT_CONTENT aspect.

DVASPECT_TRANSPARENT Objects should return the rectangle covering all transparent or irregular parts.

If the object does not have any transparent or irregular parts, it can return DV_E_ASPECT.

A container can use this rectangle to determine whether there are other objects overlapping the transparent parts of a given object.

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

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Ocidl.h, Ocidl.idl.
Link Library: Ole32.lib, Uuid.lib.

See Also

IViewObject::Draw | IViewObject2::GetExtent

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.