Compartilhar via


COMPOSITIONSTR (Windows CE 5.0)

Send Feedback

This structure contains composition information. During conversion, the IME puts conversion information into this structure.

typedef struct tagCOMPOSITIONSTR {DWORDdwSize;DWORDdwCompReadAttrLen;DWORDdwCompReadAttrOffset;DWORDdwCompReadClsLen;DWORDdwCompReadClsOffset;DWORDdwCompReadStrLen;DWORDdwCompReadStrOffset;DWORDdwCompAttrLen;DWORDdwCompAttrOffset;DWORDdwCompClsLen;DWORDdwCompClsOffset;DWORDdwCompStrLen;DWORDdwCompStrOffset;DWORDdwCursorPos;DWORDdwDeltaStart;DWORDdwResultReadClsLen;DWORDdwResultReadClsOffset;DWORDdwResultReadStrLen;DWORDdwResultReadStrOffset;DWORDdwResultClsLen;DWORDdwResultClsOffset;DWORDdwResultStrLen;DWORDdwResultStrOffset;DWORDdwPrivateSize;DWORDdwPrivateOffset;}COMPOSITIONSTR;

Members

  • dwSize
    Size, in bytes, of this structure.
  • dwCompReadAttrLen
    Length of the attribute information of the reading string of the composition string.
  • dwCompReadAttrOffset
    Offset from the beginning of this structure to the attribute information.
  • dwCompReadClsLen
    Length of the clause information of the reading string of the composition string.
  • dwCompReadClsOffset
    Offset from the beginning of this structure to the clause information.
  • dwCompReadStrLen
    Length of the reading string of the composition string.
  • dwCompReadStrOffset
    Offset from the beginning of this structure to the reading string of the composition string.
  • dwCompAttrLen
    Length of the attribute information of the composition string.
  • dwCompAttrOffset
    Offset from the beginning of this structure to the attribute information.
  • dwCompClsLen
    Length of the clause information of the composition string.
  • dwCompClsOffset
    Offset from the beginning of this structure to the clause information.
  • dwCompStrLen
    Length of the composition string.
  • dwCompStrOffset
    Offset from the beginning of this structure to the composition string.
  • dwCursorPos
    Cursor position in the composition string.
  • dwDeltaStart
    Start position of a change in the composition string. If the composition string has changed from the previous state, the first position of such a change is stored here.
  • dwResultReadClsLen
    Length of the clause information of the reading string of the result string.
  • dwResultReadClsOffset
    Offset from the beginning of this structure to the clause information of the reading string of the result string.
  • dwResultReadStrLen
    Length of the reading string of the result string.
  • dwResultReadStrOffset
    Offset from the beginning of this structure to the reading string of the result string.
  • dwResultClsLen
    Length of the clause information of the result string.
  • dwResultClsOffset
    Offset from the beginning of this structure to the clause information of the result string.
  • dwResultStrLen
    Length of the result string.
  • dwResultStrOffset
    Offset from the beginning of this structure to the result string.
  • dwPrivateSize
    Private area in this memory block.
  • dwPrivateOffset
    Offset from the beginning of this structure to the private area.

Remarks

The attribute information is a single-byte array and specifies the attributes of the string. The following table shows the contents of the array.

Value Description
ATTR_xxxxxxxxxxxx Specifies the status of the composition string.
ATTR_INPUT Character currently being entered.
ATTR_TARGET_CONVERTED Character currently being converted (already converted).
ATTR_CONVERTED Character given from conversion.
ATTR_TARGET_NOTCONVERTED Character currently being converted (yet to be converted).
ATTR_INPUT_ERROR The character is an error character and cannot be converted by the IME.
Other than the preceding: Reserved.

The following table shows descriptions of the content.

Value Description
Character currently being entered: The character the user is entering. In Japanese, this character is a hiragana, katakana, or alphanumeric, which is yet to be converted by the IME.
Character currently being converted (already converted): The character that has been selected for conversion by the user and converted by the IME.
Character given from conversion: The character to which the IME has converted.
Character currently being converted (yet to be converted): The character that has been selected for conversion by the user and not yet converted by the IME. In Japanese, this character is a hiragana, katakana, or alphanumeric, which the user has entered.
Character is an error character and cannot be converted by the IME: The character is an error character, the IME cannot convert this character. For example, some consonants cannot be put together.

The length of the attribute information is the same as the length of the string. Each byte corresponds to each byte of the string. Even if the string includes DBCS characters, the attribute information has the information bytes of both the lead byte and the second byte.

The clause information is a DWORD array and specifies the numbers that are the positions of the clause. The position of the clause is one of the positions of the composition string and this clause starts from this position. At a minimum, the length of this information is two DWORDs. This means the length of the clause information is eight bytes. The first DWORD has to be zero. This is the starting position of the first clause. The last DWORD has to be the length of this string. For example, if the string has three clauses, the clause information has four DWORDs. The first DWORD is zero. The second DWORD specifies the starting position of the second clause. The third DWORD specifies the starting position of the third clause. The last DWORD is the length of this string.

The dwCursorPos member specifies the character in the composition string where the cursor is located, in terms of the count of that character. The counting starts at zero. If the cursor is to be positioned immediately after the composition string, this value is equal to the length of the composition string. In case there is no cursor (if such a condition exists), a value -1 is specified here. If a composition string does not exist, this member is invalid.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Imm.h.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.