ImmEscape (Windows CE 5.0)

Send Feedback

This function carries out IME-specific subfunctions and is used mainly for locale-specific functions.



  • hKL
    [in] Ignored; set to NULL. Windows CE does not support true keyboard layouts.
  • hIMC
    [in] Handle to the input context.
  • uEscape
    [in] Index of the subfunction. For more information about the escape, see IME Escapes.
  • lpData
    [in] Long pointer to subfunction-specific data.

Return Values

An escape-specific value indicates success. Zero indicates an error.

Code Example

The following code example demonstrates how to use ImmEscape.

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 GetCapitalizationMode(HWND hWnd, INT *piMode)

    LRESULT lr = 0;

    HIMC hImc = ImmGetContext(hWnd);

    if (!hImc)
        DEBUGMSG(1, (_T("Failed to get handle to current input context.\r\n")));
        return FALSE;

    // Assume that capitalization modes are mutually exclusive, and determine the current capitalization mode.
    lr = ImmEscape(NULL, hImc, IME_ESC_GET_MODE, NULL);

    if (lr & IMMF_CAPSLOCK)
        *piMode = IMMF_CAPSLOCK;
    }    else if (lr & IMMF_SHIFT)
        *piMode = IMMF_SHIFT;

    return TRUE;



OS Versions: Windows CE .NET 4.0 and later.
Header: Imm.h.
Link Library: Coreimm.lib.

See Also

IME Escapes

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.