Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITextRangeProvider2::ShowContextMenu method

Programmatically invokes a context menu on the target element.

Syntax


HRESULT ShowContextMenu();

Parameters

This method has no parameters.

Return value

Type: HRESULT

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

Remarks

This method should return an error code if the context menu could not be invoked.

ShowContextMenu should always show the context menu at the beginning end point of the range. This should be equivalent to what would happen if the user pressed the context menu key or SHIFT + F10 with the insertion point at the beginning of the range.

If showing the context menu would typically result in the insertion point moving to a given location, then it should do so for programmatically invoking ShowContextMenu for Microsoft UI Automation support also.

Requirements

Minimum supported client

Windows 8.1 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 R2 [desktop apps | Windows Store apps]

Header

UIAutomationCore.h (include UIAutomation.h)

IDL

UIAutomationCore.idl

See also

ITextRangeProvider2

 

 

Community Additions

Show:
© 2014 Microsoft