|
Composition String
The composition string is the current text in the composition window. This is
the text that the IME converts to final characters. Each composition string
consists of one or more clauses, where a clause is the smallest combination of characters that the IME can
convert to a final character. You can get and set the composition string and get
and set the composition string by using the ImmGetCompositionString and ImmSetCompositionString functions.
As the user enters text in the composition window, the IME tracks the status
of the composition string. This status includes attribute information, clause
information, typing information, and cursor position. You can retrieve the
composition status by using the ImmGetCompositionString function.
In the attribute information array, all characters of one clause must have the same attribute. The attribute information is an array of 8-bit values that specifies the status of characters in the
composition string. There is one value for each byte in the string, including one
byte each for the lead and second bytes of any double-byte characters in the
string. For each value in the array, bits 0 through 3 can be one combination of
these values:
| Character being entered by the user. It is yet to be converted by the IME.
|
| Character is the error character and cannot be converted by the IME.
|
| Character converted by the IME. The user has selected this character and the
IME has converted it.
|
| A converted character. The IME has already converted this character.
|
| Character being converted. The user has selected this character but the IME
has not yet converted it.
|
All other values are reserved. In Japanese, any unconverted character having
the ATTR_INPUT attribute is a Hiragana, Katakana, or alphanumeric character. In
Korean, this character is a Hangeul character that is not converted by IME yet.
In Traditional and Simplified Chinese, each IME may limit its character in
some range.
You can retrieve the composition status by using the ImmGetCompositionString function.
The clause information is an array of 32-bit values that specify the positions of the clauses in the
composition string. There is one value for each clause and a final value that
specifies the length of the full string. Each value in the array specifies the
offset, in bytes, from the beginning of the string to the clause. The first
value is always 0 because the first clause always starts at the beginning of the
string. For example, if a string has two clauses, the clause information has
three values: the first value is 0, the second value is the offset of the second
clause, and the third value is the length of the string.
The typing information a null-terminated character string representing the characters entered at the
keyboard.
The cursor position is a value indicating the position of the cursor relative to the characters
in the composition string. The value is the offset, in bytes, from the beginning
of the string. If this value is 0, the cursor is immediately before the first
character in the string. If the value is equal to the length of the string, the
cursor is immediately after the last character. If -1, the cursor is not
present.
You can set the composition string or elements of the composition status by
using the ImmSetCompositionString function. To ensure that the composition window updates it appearance based
on these changes, the function allows for generating a notification message to
be sent to the window. Applications that set a combination of composition status
elements typically set the fNotify parameter to FALSE for all but the last call to this function so that only
one notification message is generated for the composition window.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|