SHHandleWMActivate

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function is used to help manage the input panel and your application. When a window is activated, the input panel should be restored to the state it was in when the window lost activation This function helps manage the restoration of the original state.

Syntax

WINSHELLAPI BOOL SHHandleWMActivate(
  HWND hwnd,
  WPARAM wParam,
  LPARAM lParam,
  SHACTIVATEINFO * psai,
  DWORD dwFlags
);

Parameters

  • hwnd
    [in] Handle to window processing the WM_ACTIVATE message.
  • wParam
    [in] Specifies the wParam of the WM_ACTIVATE message.
  • lParam
    [in] Specifies the lParam of the WM_ACTIVATE message.
  • psai
    [in] Pointer to a SHACTIVATEINFO structure. If you are also sizing your window when the input panel is raised or lowered, this should be a pointer to the same memory you pass to SHHandleWMSettingChange.
  • dwFlags
    [in] SHA_INPUTDIALOG is used in dialog boxes where the user is entering a large amount of data. For example, when creating a new appointment in Calendar, use this flag in conjunction with SHSipPreference (hwnd, SIP_INPUTDIALOG). That is, call SHSipPreference during WM_INITDIALOG processing, and then pass this flag to SHHandleWMActivate. Using this flag will prevent the input panel from being raised or lowered when the user navigates to different fields in the dialog box. Instead, the input panel will stay raised until the user explicitly lowers it.

Return Value

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

Remarks

The SHACTIVATEINFO structure must be zero-initialized before calling the SHHandleWMActivate function the first time. Typically, this is done during WM_CREATE or WM_INITDIALOG processing.

Note

Make sure to zero-initialize SHACTIVATEINFO as early as possible within WM_CREATE or WM_INITDIALOG to avoid a runtime error.

Requirements

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

See Also

Reference

WM_ACTIVATE
SHACTIVATEINFO
SHHandleWMSettingChange
SHSipPreference
WM_INITDIALOG