Compartir a través de


ImmEscape (Windows Embedded CE 6.0)

1/6/2010

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 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 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
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Concepts

IME Escapes

Other Resources

Input Method Manager (IMM) Functions