ShellProc

  LRESULT CALLBACK ShellProc(code, wParam, lParam)    
  int code; /* hook code */
  WPARAM wParam; /* current-task flag */
  LPARAM lParam; /* undefined */

The ShellProc function is an application- or library-defined callback function that a shell application can use to receive useful notifications from the system.

Parameters

code

Specifies a shell-notification code. This parameter can be one of the following values:

Value Meaning

HSHELL_ACTIVATESHELLWINDOW  
  The shell application should activate its main window.
HSHELL_WINDOWCREATED  
  A top-level, unowned window was created. The window exists when the system calls a ShellProc function.
HSHELL_WINDOWDESTROYED  
  A top-level, unowned window is about to be destroyed. The window still exists when the system calls a ShellProc function.

wParam

Specifies additional information the shell application may need. The interpretation of this parameter depends on the value of the code parameter, as follows:

code wParam

HSHELL_ACTIVATESHELLWINDOW  
  Not used.
HSHELL_WINDOWCREATED  
  Specifies the handle of the window being created.
HSHELL_WINDOWDESTROYED  
  Specifies the handle of the window being destroyed.

lParam

Reserved; not used.

Return Value

The return value should be zero.

Comments

An application must install this callback function by specifying the WH_SHELL filter type and the procedure-instance address of the callback function in a call to the SetWindowsHookEx function.

ShellProc is a placeholder for the application- or library-defined function name. The actual name must be exported by including it in the EXPORTS statement in a module-definition file.

See Also

CallNextHookEx, SendMessage, SetWindowsHookEx