windows_programming_notes.nbk: Home | Index | Next Page: WM_SETTEXT | Previous Page: WM_SETHOTKEY
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 box, and the small icon in the window caption.
To send this message, call the SendMessage function with the following parameters.
SendMessage( (HWND) hWnd, // handle to destination window WM_SETICON, // message to send (WPARAM) wParam, // icon type (LPARAM) lParam // handle to icon (HICON) );
The return value is a handle to the previous large or small icon, depending on the value of wParam. It is NULL if the window previously had no icon of the type indicated by wParam.
The DefWindowProc function returns a handle to the previous large or small icon associated with the window, depending on the value of wParam.
Windows NT/2000 or later: Requires Windows NT 4.0 or later. Windows 95/98/Me: Requires Windows 95 or later. Header: Declared in Winuser.h; include Windows.h.
windows_programming_notes.nbk: Home | Index | Next Page: WM_SETTEXT | Previous Page: WM_SETHOTKEY
Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time