Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This message is sent by an application to associate a new big or small icon with a window.

Syntax

WM_SETICON 
wParam = (WPARAM)(BOOL) 
fType;

lParam = (LPARAM)(HICON) 
hicon;

Parameters

fType

Specifies the type of icon being set. The following table shows the possible values. This parameter can be one of these values.

Value Description

ICON_BIG

Sets the large icon for the window.

ICON_SMALL

Sets the small icon for the window.

hicon

Handle to the new large or small icon. If this parameter is NULL, the icon indicated by fTypeis removed.

Return Value

The return value is a handle to the previous large or small icon, depending on the value of fType.NULL indicates that the window previously had no icon of the type indicated by fType.

The default action is that the DefWindowProcfunction returns a handle to the previous large or small icon associated with the window, depending on the value of fType.

Remarks

Icons are stored per window class, not per window.

Requirements

Header winuser.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also