Supporting the Input Panel (Windows CE 5.0)
The AYGShell API extensions, which are used to extend the standard shell, can also support applications that can activate the input panel themselves or be activated by a user. In either case, a program's top-level window procedure needs to call the SHHandleWMSettingChange function. The shell can then resize the window when the input panel appears or disappears.
When a window is activated, the input panel should be restored to the state it was in when the window lost activation. The SHHandleWMActivate function is called to support the restoration of the original state.
You can call the SHSipPreference function to indicate the current desired position of the input panel.
The following code example shows how to use the SHSipPreference function in code that could be used as part of a custom control.
case WM_SETFOCUS:
SHSipPreference(hwnd, SIP_UP);
break;
case WM_KILLFOCUS:
SHSipPreference(hwnd, SIP_DOWN);
break;
Note This function is generally used by controls to position the input panel when the focus changes. Any control that requests SIP_UP should at some point request SIP_DOWN, generally when focus is lost.
The WC_SIPPREF control is used to implement default input panel behavior in a dialog box automatically. This means that in general, any control in the system that accepts text input should display the input panel when the control gains focus, and hide the input panel when the control loses focus.
Note The WC_SIPPREF control should be used as the last control in a dialog box template. To use the WC_SIPPREF control, the application must first call SHInitExtraControls.
When the WC_SIPPREF control is created, it enumerates all sibling controls and implements the correct input panel behavior for each of the following controls:
Edit
Combo box (CBS_DROPDOWN style only)
Date and time picker
**Note **When edit controls use WC_SIPPREF, they have automatic context menu support for commands such as Cut, Copy, and Paste.
See Also
Send Feedback on this topic to the authors