An application sends the WM_SETICON message to associate a new large or small icon with a window. The system displays the large icon in the ALT+TAB dialog, and the small icon in the window caption.
WM_SETICON
wParam = (WPARAM) fType; // icon type
lParam = (LPARAM) (HICON) hicon; // handle to icon
Value | Meaning |
ICON_BIG | Set the large icon for the window. |
ICON_SMALL | Set the small icon for the window. |
The return value is a handle to the previous large or small icon, depending on the value of fType. It is NULL if the window previously had no icon of the type indicated by fType.
The DefWindowProc function returns a handle to the previous large or small icon associated with the window, depending on the value of fType.
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_GETICON