The WM_GETICON message is sent to a window to retrieve a handle to the large or small icon associated with a window. The system displays the large icon in the Alt+Tab dialog, and the small icon in the window caption.
WM_GETICON 
fType = wParam;  // icon type
 | Value | Meaning | 
|---|---|
| ICON_BIG | Retrieve the large icon for the window. | 
| ICON_SMALL | Retrieve the small icon for the window. | 
The return value is a handle to the large or small icon, depending on the value of fType. When an application receives this message, it can return a handle to a large or small icon, or pass the message to DefWindowProc.
DefWindowProc returns a handle to the large or small icon associated with the window, depending on the value of fType.
When an application receives this message, it can return a handle to a large or small icon, or pass the message to DefWindowProc.
  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winuser.h.
Windows Overview, Window Messages, DefWindowProc, WM_SETICON