Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method returns a rectangle describing a requested drawing aspect.
Syntax
HRESULT GetRect( DWORD dwAspect, LPRECTL pRect ); |
Parameters
- dwAspect
-
[in] Drawing aspect requested.
- pRect
-
[out] Pointer to the rectangle describing the requested drawing aspect.
Return Value
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::Drawmethod 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
Header | ocidl.h, ocidl.idl |
Library | ole32.lib, uuid.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |