IAccessible::accLocation

[This is preliminary documentation and subject to change.]

Retrieves the object's current screen location (if the object was placed on the screen) and optionally, the child element.

HRESULT accLocation(
  long *pxLeft,
  long *pyTop,
  long *pcxWidth,
  long *pcyHeight,
  VARIANT varChild
);
 

Parameters

pxLeft and pyTop
[out] Specifies the x- and y-coordinates of the upper left boundary of the object's location.
pcxWidth and pcyHeight
[out] Value specifying the object's width and height, in pixels.
varChild
[in] Value identifying the child whose location will be retrieved. This parameter can be the child ID value (provided by the object), CHILDID_SELF for the object itself, or a string identifying the child (such as "A1").

Return Values

Returns S_OK if successful or E_INVALIDARG or another standard COM error code otherwise.

Remarks

This method retrieves the object's bounding rectangle. If the object is a region, then this method returns the biggest rectangle encompassing the entire region.

Note Implementers: This method must not fail for visual objects. The only nonvisual objects are sound objects.