STM_SETICON
wParam = (WPARAM) (HICON) hicon; /* handle of the icon */
lParam = 0L; /* not used, must be zero */
An application sends an STM_SETICON message to associate an icon with an icon resource.
hicon
Value of wParam. Identifies the icon to associate with the icon resource.
The return value is the handle of the icon that was previously associated with the icon resource, or it is zero if an error occurred.
This example associates the system-defined question-mark icon with an icon resource:
HICON hIcon, hOldIcon;
hIcon = LoadIcon((HANDLE) NULL, IDI_QUESTION);
hOldIcon = (HICON) SendDlgItemMessage(hdlg, IDD_ICON,
STM_SETICON, hIcon, 0L);