Skip to main content

Windows Dev Center

IUIAutomationDragPattern::GetCachedGrabbedItems method

Retrieves a cached collection of elements that represent the full set of items that the user is dragging as part of a drag operation.

Syntax


HRESULT GetCachedGrabbedItems(
  [out, retval, optional] IAutomationElementArray **retVal
);

Parameters

retVal [out, retval, optional]

Type: IAutomationElementArray**

The cached collection of elements that the user is dragging. This property is NULL or an empty array if only a single item is being dragged. The default value is an empty array.

Return value

Type: HRESULT

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

Remarks

If the user is dragging multiple items, the items are represented by a single master element with an associated set of grabbed elements. The master item fires the appropriate events, to avoid having a large set of duplicate events. The client can query the GrabbedItems property to get the full list of grabbed items.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

See also

IUIAutomationDragPattern