UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:ocidl.IViewObjectEx.QueryHitRect |
IViewObjectEx::QueryHitRect (ocidl.h) |
Indicates whether any point in a rectangle is within a given drawing aspect of an object. |
|
com\iviewobjectex_queryhitrect.htm |
com |
eb155424-e74c-497f-a9c0-33ed3b2b5513 |
12/05/2018 |
IViewObjectEx interface [COM],QueryHitRect method, IViewObjectEx.QueryHitRect, IViewObjectEx::QueryHitRect, QueryHitRect, QueryHitRect method [COM], QueryHitRect method [COM],IViewObjectEx interface, _ole_iviewobjectex_queryhitrect, com.iviewobjectex_queryhitrect, ocidl/IViewObjectEx::QueryHitRect |
ocidl.h |
Windows |
Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
OCIdl.idl |
Windows |
19H1 |
|
|
|
|
|
|
Indicates whether any point in a rectangle is within a given drawing aspect of an object.
The requested drawing aspect.
An object bounding rectangle in client coordinates of the containing window. This rectangle is computed and passed by the container so that the object can meaningfully interpret the hit location.
The hit test rectangle, specified in HIMETRIC units, relative to the top-left corner of the object.
The suggested distance, in HIMETRIC units, that the container considers close. This value is a hint, and objects can interpret it in their own way. Objects can also use this hint to roughly infer output resolution to choose expansiveness of hit test implementation.
A pointer to returned information about the hit expressed as the HITRESULT enumeration values.
This method returns S_OK on success. Other possible return values include the following.
Return code | Description |
---|---|
|
This method is not implemented for the requested aspect. Use DVASPECT_CONTENT instead. |
Containers may need to test whether an object overlaps a given drawing aspect of another object. They can determine whether the objects overlap by requesting a region or at least a bounding rectangle of the aspect in question. However, a quicker way to do this is to call IViewObjectEx::QueryHitRect to ask the object whether a given rectangle intersects one of its drawing aspects.