次の方法で共有


EM_SETINPUTMODE (Compact 2013)

3/28/2014

The EM_SETINPUTMODE message sets the default input mode. In Windows Embedded Compact 2013, you should use the InputScope enumeration and Input Scope Functions instead.

Syntax

EM_SETINPUTMODE 
    wParam = (WPARAM)res;
    lParam = (LPARAM)flag;

Parameters

  • res
    This parameter is reserved for future use; the value of this parameter must be set to 0.
  • flag
    Specifies the default input mode. See Remarks for the possible values.

Return Value

Returns TRUE on success and FALSE on failure.

Remarks

The following table lists the possible values for the lParam parameter.

Value

Description

EIM_SPELL

Specifies the Spell input mode (also called Multi-tap). This mode relies on multiple presses of a dialer key to iterate through possible character entries.

EIM_AMBIG

Specifies the Ambiguous input mode (also called Predicative Text). This mode is a progressive text entry system that takes ambiguous text input and maps it to likely matches in a dictionary.

EIM_NUMBERS

Specifies the Numbers input mode.

EIM_TEXT

Specifies the Text input mode, which is shared across the system. This mode is either Spell or Predicative Text depending on which one was last used by a user in an edit control. Use the Text input mode in edit controls where the user's mode preference will indicate the default mode.

Code Example

The following code example demonstrates how to use EM_SETINPUTMODE.

Note

To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.

BOOL EMSETINPUTMODEExample(HWND hWnd)
{
    // Set the input mode to last setting used by user, 
    // which could be either Spell (also know as Multi-Tap) or T9.
    // Note - A T9 engine must be licensed and purchased from a 
    // third party supplier, it is not provided by Microsoft.
    If (!SendMessage(hWnd, EM_SETINPUTMODE, 0, EIM_TEXT))
    {
        DEBUGMSG(1, (_T("Could not switch window 0x%X to EIM_TEXT.\r\n"),hWnd));
        return FALSE;
    }
    return TRUE;
}

Requirements

Header

windowsm.h

See Also

Reference

Input Scope Messages
EM_GETINPUTMODE