![]() |
|
Working with SIP
By Vassili Philippov, December 07, 2001.
SummaryThe main input method on Pocket PC is SIP (Soft Input Panel). There are special SIP related user interface requirements discussed in this article. Background
Show/hide SIPYou can use different functions for showing and hiding SIP. It is recommended to use SHSipPreference function for that. However, sometimes this function does not work and you have to use low-level access to SIP window using FindWindow and ShowWindow functions. Find a window with SipWndClass class and you can treat it as any other window. Using SHSipPreference function is very simple. Here is a code to show SIP: and a code to hide it: Auto-showStandard Pocket PC applications show SIP automatically when the focus is in a typable field. There are at least two ways of implementing such behaviour. Handling EN_SETFOCUS and EN_KILLFOCUSYou can handle EN_SETFOCUS and EN_KILLFOCUS events for each edit control (use Class Wizard for that) and show SIP in EN_SETFOCUS handler and hide SIP in EN_KILLFOCUS handler. Using SIPPREF controlYou can insert SIPPREF control in your dialog that will automatically show SIP when focus is in a typable control. To add SIPPREF control you can either edit dialog resource in text mode:
Or you can insert it in the resource editor - insert a custom control and set class name to SIPPREF. Logo requirementsThere exist the following SIP related logo requirements that can be considered as guide lines for developers. SIP button in the standard locationThese requirements will be satisfied automatically if you use only standard functions for working with SIP. Required: Display New and SIP button controls only in their standard locations. It is not required that an application always displays the New and SIP buttons. However, whenever these controls are displayed, they should be displayed in their standard locations in the bottom left and bottom right, respectively. It is strongly recommended that any application that has the ability to create new data objects uses a New button in the same location and supports the Pocket PC global New functionality for users who have this feature turned on. The SIP control should be displayed continuously in most applications, and be hidden only in a rare case where no input of any kind is possible (e.g. full screen mode of a game). Hiding/showing the SIP button should not be overdone to avoid confusion of when it is available - it is far more confusing to have it flash than to have the SIP control visible in some views where no input is possible. SIPTo satisfy this requirement do not add edit controls at the bottom of your dialogs. Make sure that edit controls are not covered when SIP is opened. Required: Applications should handle the Input Panel appearing/disappearing. From the UI perspective, an application should be designed to account for the fact that an 80-pixel high Soft Input Panel (SIP) may be docked in the area immediately above the command bar at any moment, requiring the application to be resized out of the way. The specific requirements are:
Auto show/hide SIPShow SIP automatically when typable controls (edit, etc) get focus and hide SIP when non-typable controls (buttons, drop-down lists, etc) get focus. Recommended: Careful use of automatical hiding/showing the Input Panel. Usability testing shows that gratuitous hiding/showing of the Input Panel has negative performance and user experience implications. Therefore, applications must be very careful when changing the state of the input panel automatically. A good rule of thumb is that the Input Panel should only be shown or hidden if the user is extremely likely to want this behavior. There are two cases where the SIP state should be changed:
Non-full screen dialogsMost programs do not use non-full screen dialogs on Pocket PC. Required: Non-full screen dialogs displayed out of the way of the Input Panel. Any non-full screen dialog should be vertically centered in the area above the standard, 80 pixel high Input Panel when it is displayed. It should be placed in this space even if the Input Panel is not currently displayed, since if a user displays the Input Panel, no part of the dialog will be re-covered. If a dialog is higher than the space available when the Input Panel is displayed, the dialog should be butted against the top of the screen. Message box text should be informative but brief to avoid part of the message box potentially being hidden behind the SIP. Related resources:
DiscussDiscuss this article. Here you can write your comments and read comments of other developers. |
|||||||||||||||||||||