Share via


IValueProvider::SetValue Method

Sets the value of control.

Syntax

HRESULT SetValue(      
    LPCWSTR val
);

Parameters

  • val
    [in] The value to set. The provider is responsible for converting the value to the appropriate data type.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

Single-line edit controls support programmatic access to their contents by implementing IValueProvider. However, multi-line edit controls do not implement IValueProvider; instead they provide access to their content by implementing ITextProvider.

Controls such as ListItem and TreeItem must implement IValueProvider if the value of any of the items is editable, regardless of the current edit mode of the control. The parent control must also implement IValueProvider if the child items are editable.

See Also

UI Automation Providers Overview