BM_SETIMAGE

An application sends a BM_SETIMAGE message to associate a new image (icon or bitmap) with the button.

BM_SETIMAGE 
wParam = (WPARAM) fImageType;       // image-type flag 
lParam = (LPARAM) (HANDLE) hImage;  // handle to the image 
 

Parameters

fImageType
Value of wParam. Specifies the type of image to associate with the button. This parameter can be one of the following values:

IMAGE_BITMAP
IMAGE_ICON

hImage
Value of lParam. Handle to the image to associate with the button.

Return Values

The return value is a handle to the image previously associated with the button, if any; otherwise, it is NULL.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winuser.h.

See Also

Buttons Overview, Button Messages, BM_GETIMAGE