Receiving Input from an Input Panel

Windows CE–based devices that do not have a keyboard require an input method (IM) to simulate keyboard input. For this purpose, Windows CE implements an input panel architecture that functions through a touch screen. This input panel architecture is an IM that enables your application to accommodate input in multiple forms.

The Windows CE IM requires two parts: the software input panel subsystem and IMs. The primary difference between Windows CE IMs and usual keyboard input is that an additional level of interpretation is necessary in Windows CE to convert non-keyboard input into a keyboard event. This conversion is handled by the input panel subsystem in the OS, which also manages software input methods.

The IM can display the input panel window in a specific state by using the IIMCallback::SetImInfo method. This method also changes the icon appearing on the Input Panel button. To adjust to user-initiated changes in the input panel window, applications can query the SIPINFO structure for data on the input panel window size, state, and visible client area.

The input panel creates the IM through the IInputMethod interface. Once created, the IM receives user input and passes this data to the input panel through the IIMCallBack interface. After the input panel receives data from the IM, the input panel passes the data to the Graphics, Windowing, and Events Subsystem (GWES) module. Usually, this message is a keyboard event. GWES passes the message to your application through the standard keyboard event delivery system. The following illustration shows how an IM, an input panel, GWES, and an application communicate.

If the input panel is altered, the OS sends out a WM_SETTINGCHANGE message to all active applications. The application can modify the input panel and IM through the SHSipInfo function.

Note To use input panel technology, your device must include Coresip.lib. This component enables any application to initialize an IM. Call the SipStatus function to be sure that Coredsip.lib is present before implementing IMs.