This function requests a change of position for the input panel.
BOOL SHSipPreference( HWND hwnd, SIPSTATE st );
[in] Handle to the window requesting the desired input panel position.
[in] Specifies the requested position for the input panel. The following table shows the allowable values for this parameter.
A request to display the input panel. Any pending SIP_DOWN requests are ignored.
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.
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.
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.
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;