Share via


ImmSetCompositionString (Windows CE 5.0)

Send Feedback

This function sets the characters, attributes, and clauses of the composition and reading strings.

BOOL ImmSetCompositionString(HIMChIMC,DWORDdwIndex,LPCVOIDlpComp,DWORD dwCompLen, LPCVOIDlpRead,DWORD dwReadLen);

Parameters

  • hIMC
    [in] Handle to the input context.
  • dwIndex
    [in] Value that specifies the type of information to set. This parameter can be one of one of the following values:
    Value Description
    SCS_SETSTR Sets the composition string, the reading string, or both. At least one of the lpComp and lpRead parameters must point to a valid string. If either string is too long, the IME truncates it.
    SCS_CHANGEATTR Sets attributes for the composition string, the reading string, or both. At least one of the lpComp and lpRead parameters must point to a valid attribute array.
    SCS_CHANGECLAUSE Sets the clause information for the composition string, the reading string, or both. At least one of the lpComp and lpRead parameters must point to a valid clause information array.
  • lpComp
    [in] Long pointer to the buffer containing the information to set for the composition string. The information is as specified by the dwIndex value.
  • dwCompLen
    [in] Size, in bytes, of the information buffer for the composition string.
  • lpRead
    [in] Long pointer to the buffer containing the information to set for the reading string. The information is as specified by the dwIndex value.
  • dwReadLen
    [in] Size, in bytes, of the information buffer for the reading string.

Return Values

Nonzero indicates success. Zero indicates failure.

Remarks

When changing attributes, all characters in a clause must have the same attribute. Converted characters must be either ATTR_CONVERTED or ATTR_TARGET_CONVERTED; unconverted characters either ATTR_INPUT or ATTR_TARGET_NOTCONVERTED.

When changing clause information, only the target clause can be changed and only one boundary of the clause can be changed at a time. The target clause has the ATTR_TARGET_CONVERTED or ATTR_TARGET_NOTCONVERTED attribute.

When the IME completes the changes, it sends a WM_IME_COMPOSITION message to the application notifying it of the changes.

Requirements

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

See Also

WM_IME_COMPOSITION

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.