SHACTIVATEINFO (Compact 2013)

3/28/2014

This structure sets members for the SHHandleWMActivate function.

Syntax

typedef struct {
  DWORD cbSize.;
  HWND hwndLastFocus.;
  UINT fSipUp.:1;
  UINT fSipOnDeactivation. :1;
  UINT fActive :1;
  UINT fReserved :29;
} SHACTIVATEINFO, *PSHACTIVATEINFO;

Members

  • cbSize
    Size of SHACTIVATEINFO structure.
  • hwndLastFocus
    Handle to the window that had focus when losing activation. Focus will be restored to this window when gaining activation.
  • fSipUp
    Current state of the software-based input panel (SIP).
  • fSipOnDeactivation
    State of the SIP when losing activation.
  • fActive
    Set this member to TRUE if the window is active and FALSE if it is inactive.
  • fReserved
    Reserved; set to 0 (zero).

Remarks

The SHACTIVATEINFO structure must be zero-initialized before calling the SHHandleWMActivate function the first time. In addition, the cbSize member should be set to the size of the variable of type SHACTIVATEINFO. For example,

static SHACTIVATEINFO shellactinfo;
// Initialize the shell activate info structure 
// before calling SHHandleWMActivate function
memset(&shellactinfo, 0, sizeof (shellactinfo));
shellactinfo.cbSize = sizeof (shellactinfo);

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

See Also

Reference

Shell Structures