次の方法で共有


SetInputScope (Compact 2013)

3/28/2014

Sets a single InputScope for the specified input field.

Syntax

HRESULT SetInputScope(
    HWND hwnd, 
    InputScope inputscope
);

Parameters

  • hwnd
    [in] The input field to set the InputScope on.
  • inputscope
    [in] The InputScope to associate with the input field's hwnd.

Return Value

Returns S_OK if the input scope is set or cleared successfully.

Returns E_OUTOFMEMORY if it cannot allocate enough memory to store the InputScope set.

Returns ERROR_INVALID_WINDOW_HANDLE if hwnd is NULL. If hwnd is not a valid handle in the thread, it returns E_INVALIDARG.

Returns ERROR_INVALID_DATA if inputscope is invalid.

Remarks

This function replaces any InputScope values that may have been set on the hwnd previously.

If the inputscope value is IS_DEFAULT, the InputScope property bounded on hwnd will be removed and destroyed.

Code Example

The following code shows how to set an input scope for a window.

SetInputScope(hwnd, IS_EMAIL_USERNAME);

Requirements

Header

inputscope.h

See Also

Reference

Input Scope Functions
InputScope
Input Method Editor Reference