Freigeben über


Editing the Composition String (Windows CE 5.0)

Send Feedback

If the IME UI receives the control keys for string editing, it must to edit the composition buffers managed by the conversion service.

To request the conversion service to edit the composition buffers, the IME UI calls the IImeIPoint2::ControlIME method with an appropriate function identifier. For example, if you want to move the caret left, you must call the ControlIME method with the IPCTRL_CARETLEFT function identifier. If you want to delete a character before the caret, call the ControlIME method with the IPCTRL_CARETBACKSPACE function identifier. You may create a mapping table to map control keys to the corresponding function identifiers.

Because the composition string is updated by this call, IME UI will need to display the updated composition string for users. IME UI calls IImeIPoint2::UpdateContext method to request the conversion service to send back the composition buffer contents through the IImeIPointNotifySink callback function.

The following code sample shows how to edit the composition buffers by moving the caret left:

// Move the caret left and backspace
pIP->ControlIME(IPCTRL_CARETLEFT, IPCTRLPARAM_DEFAULT);
pIP->ControlIME(IPCTRL_CARETBACKSPACE, IPCTRLPARAM_DEFAULT);
pIP->UpdateContext(TRUE);

See Also

Using the IImeIPoint2 Interface | Accessing the Conversion Service | Creating a Notification Sink | Processing User Input from the Keyboard | Processing User Input with Alternatives | Converting a Composition String | Creating the Candidate List | Determining the Composition String

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.