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.

SetInputScope function

Sets an input scope for the specified window.

Syntax


HRESULT SetInputScope(
  _In_  HWND hwnd,
  _In_  InputScope inputscope
);

Parameters

hwnd [in]

The window to set the scope on.

inputscope [in]

The input scope to associate with the window. To remove the input scope association, pass IS_DEFAULT to this parameter.

Return value

ValueMeaning
S_OKThe method was successful.

 

Remarks

Calling this method replaces whatever scope is associated with the window.

An application must call this method, passing in IS_DEFAULT to the hwnd parameter, to remove the input scope association before the window is destroyed.

This API works only when the window (hwnd parameter) and the calling thread are in the same thread. If you call this API for a different thread's window, it fails with E_INVALIDARG.

If you call this method on a window (hwnd parameter) that has not been associated with a Document Manager, then no text service notifications are sent to interested clients (such as the touch keyboard) that may want to respond to the scope change.

Examples

[C++]

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



SetInputScope(hwnd, IS_EMAIL_USERNAME);


Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

InputScope.h

DLL

Msctf.dll

 

 

Community Additions

Show:
© 2015 Microsoft