Share via


ImmEscape (Compact 2013)

3/28/2014

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

Syntax

LRESULT ImmEscape( 
  HKL hKL, 
  HIMC hIMC, 
  UINT uEscape, 
  LPVOID lpData
);

Parameters

  • hKL
    [in] Ignored; set to NULL. Windows Embedded Compact 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 Value

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;
  ASSERT(hWnd);
  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;
}

Requirements

Header

imm.h

Library

Coreimm.lib

See Also

Reference

Input Method Manager (IMM) Functions

Other Resources

IME Escapes