Compartir a través de


Using Japanese Input Methods (Windows Embedded CE 6.0)

1/6/2010

An input method (IM) is an in–process Component Object Model (COM) server that implements the IInputMethod interface. Windows Embedded CE provides a default QWERTY keyboard IM to handle alphanumeric input. The IM manages the space inside the input panel window. Within this window, the IM is responsible for screen output and for responding to user input. Typically, an IM creates a child window of the input panel window. This action enables the IM window to respond to user input through the input panel window; the IM does not have access to the WindowProc function of the input panel window unless the IM subclasses that window. The IM usually converts user input into characters and sends those characters to the input panel through the IIMCallback interface.

In order to use an IM, the user first selects the IM from the input panel dialog box or the Input Panel button. The input panel loads the selected IM dynamically by calling the CoCreateInstance function. When the user selects a different IM, the input panel frees the existing IM by calling the IUnknown::Release method on the interface pointer. The input panel then calls IInputMethod methods to notify the IM of events and to request data. The input panel implements and exposes the IIMCallback interface. This interface lets the IM call the input panel to send keystrokes to the application through GWES. The following table shows the methods that are available through the IIMCallback interface.

IIMCallback method Description

IIMCallback::SetImInfo

Lets the IM change the icon of the input panel and the visible state of the input panel.

IIMCallback::SendVirtualKey

Modifies the global key state.

IIMCallback::SendCharEvents

Sends Unicode characters to the window that currently has the focus.

IIMCallback::SendString

Sends strings to the window that currently has the focus.

In response to the input panel calls to methods of the IInputMethod interface, an IM creates windows in the contexts of the input panel thread. This way, the input panel and the IM belong to the same message loop. For purposes of simplicity, all calls to methods of the IIMCallback interface should be made in the input panel thread. That is, the IM should call IIMCallback methods only in response to a call coming through an IInputMethod method.

Additionally, the IM should not create a separate thread to implement a UI. Only the thread that responds to IInputMethod methods should create and manipulate windows. Instead, the IM can create process threads to implement a UI*.* However, these process threads must not call IIMCallback, because certain GWES window functions work properly only if they are created from the same thread that created the window.

In This Section

  • Japanese
    Provides an overview of the locale–specific support for Japanese.

See Also

Other Resources

Japanese Input Methods