Determines the area at a given location.
| C# | bool Success = object.HitTestV(float x, float y, out object Area); |
| VB.NET | Success = object.HitTestV(ByVal x As Single, ByVal y As Single, ByRef Area As Object) As Boolean |
| C++ | VARIANT_BOOL Success = object->HitTestV(float x, float y, const _variant_t&* Area); |
| C | HRESULT object->raw_HitTestV(float x, float y, VARIANT* Area, VARIANT_BOOL* Success); |
object
x
An expression that evaluates to the x coordinate to be tested. The units used depend on the container used (e.g., Visual C++ uses pixels).
y
An expression that evaluates to the y coordinate to be tested. The units used depend on the container used (e.g., Visual C++ uses pixels).
Area
Returns the area description where the coordinates x, y are located.
| Area | Value | Description |
|---|---|---|
| areaSftMaskCaption | 0 | Caption area |
| areaSftMaskEdit | 1 | Edit control (i.e., the editable portion of the control) |
| areaSftMaskSpin | 2 | Up/down buttons |
| areaSftMaskDropDown | 3 | Drop down button |
| areaSftMaskEllipse | 4 | Ellipse button |
| areaSftMaskError | 5 | Error image |
Success
Returns True if the coordinates x, y are located in the control. If the coordinates are not located in one of the areas, False is returned and Area is set to -1.
The HitTestV method determines the area at a given location.
The general area where the coordinates described by x, y are located in the control (relative to the top, left corner of the control) is returned in Area.
HitTestV is used for languages such as VBScript, which are limited by requiring Variant arguments and do not support strongly typed arguments for return values.
See Also SftMask Object | Object Hierarchy