Поделиться через


Processing User Input with Alternatives (Windows Embedded CE 6.0)

1/6/2010

Some input methods, such as handwriting recognition, generate alternatives for each character that is entered by the user. To process a character with its alternatives, the IME UI first fills out an IPCANDIDATE structure with the character and alternatives and then calls the IImeIPoint2::InsertImeItem method.

To display the updated composition string, the IME UI calls the IImeIPoint2::UpdateContext method to request the conversion service to send back the composition buffer contents through the IImeIPointNotifySink callback function.

The IME UI can retrieve the alternatives of a character through a call to the IImeIPointNotifySink::SetCandidateStr method. To retrieve alternatives of a specific character, the IME UI must move the insertion point to the character and then call the IImeIPoint2::UpdateContext method. If the character string has already been converted, the conversion service will send the candidates of the target clause instead of the alternatives of the character. You can obtain the alternatives of the character when the string is not converted; for example, the attribute of the character is ATTR_INPUT or ATTR_TARGET_NOTCONVERTED.

See Also

Concepts

Accessing the Conversion Service
Creating a Notification Sink
Processing User Input from the Keyboard
Editing the Composition String
Converting a Composition String
Creating the Candidate List
Determining the Composition String

Other Resources

Using the IImeIPoint2 Interface