IUIAutomationElement::GetClickablePoint method

Retrieves a point on the element that can be clicked.

Syntax


HRESULT GetClickablePoint(
  [out]         POINT *clickable,
  [out, retval] BOOL  *gotClickable
);

Parameters

clickable [out]

Type: POINT*

Receives the physical screen coordinates of a point that can be used by a client to click this element.

gotClickable [out, retval]

Type: BOOL*

Receives TRUE if a clickable point was retrieved, or FALSE otherwise.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

A client application can use this method to simulate clicking the left or right mouse button. For example, to simulate clicking the right mouse button to display the context menu for a control:

  • Call the GetClickablePoint method to find a clickable point on the control.
  • Call the SendInput function to send a right-mouse-down, right-mouse-up sequence.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps only]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

See also

Reference
Automation Element Property IDs
IUIAutomationElement

 

 

Show: