WM_SETICON

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

WM_SETICON wParam = (WPARAM)(BOOL) fType;
lParam = (LPARAM)(HICON) hicon;

Parameters

  • fType
    Specifies the type of icon being set. It is one of the following 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 fType is removed.

Return Values

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.

  • Default Action
    The DefWindowProc function 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

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

DefWindowProc, WM_GETICON

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.