Partager via


SHSipPreference

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function requests a change of position for the input panel.

Syntax

BOOL SHSipPreference(
  HWND hwnd,
  SIPSTATE st
);

Parameters

  • hwnd
    [in] Handle to the window requesting the desired input panel position.
  • st
    [in] Specifies the requested position for the input panel. The following table shows the allowable values for this parameter.

    Value Description

    SIP_UP

    A request to display the input panel. Any pending SIP_DOWN requests are ignored.

    SIP_DOWN

    A request to hide the input panel. When this value is used, a timer is set and the input panel is lowered only after the timer message is received. This approach prevents the input panel from flashing when one control requests SIP_DOWN and another control immediately requests SIP_UP.

    SIP_FORCEDOWN

    Forces the input panel to be hidden immediately, without setting a timer. Use this value if you want the input panel hidden and are sure there will be no SIP_UP requests. This would be appropriate if, for example, your application is a full-screen game.

    SIP_UNCHANGED

    Tells the system to ignore any pending down requests. If SHSipPreference is called with the SIP_DOWN flag, the system sets a timer and after the timer fires, the input panel is lowered. However, if you call SIP_UNCHANGED before the timer fires, then the input panel will stay in its current location.

Return Value

This function returns TRUE if it is successful and FALSE if it fails.

Remarks

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. This is generally done generally when the focus is lost.

The following code example shows how to use the SHSipPreference function in code that might be part of a custom control.

case WM_SETFOCUS:
  SHSipPreference(hwnd, SIP_UP);
  break;
case WM_KILLFOCUS:
  SHSipPreference(hwnd, SIP_DOWN);
  break;

Requirements

Header aygshell.h
Library aygshell.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2000 and later