Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
TSF Reference
TSF Functions
 SetInputScope
Text Services Framework
SetInputScope

Sets an input scope for the specified window.

HRESULT SetInputScope(
HWND hwnd,  
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 Values

Value Meaning
S_OK The 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.

Example Code

[C++]

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

SetInputScope(hwnd, IS_EMAIL_USERNAME);

Requirements

Windows XP: Included in Windows XP SP2.
Header: Declared in InputScope.idl and InputScope.h.
Library: Included as a resource in Msctf.dll.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker