Export (0) Print
Expand All

BM_SETIMAGE message

Associates a new image (icon or bitmap) with the button.

Parameters

wParam

The type of image to associate with the button. This parameter can be one of the following values:

  • IMAGE_BITMAP
  • IMAGE_ICON
lParam

A handle (HICON or HBITMAP) to the image to associate with the button.

Return value

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

Remarks

The appearance of text, an icon, or both on a button control depends on the BS_ICON and BS_BITMAP styles, and whether the BM_SETIMAGE message is called. The possible results are as follows:

BS_ICON or BS_BITMAP Set?BM_SETIMAGE Called?Result
YesYesShow icon only.
NoYesShow icon and text.
YesNoShow text only.
NoNoShow text only

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

BM_GETIMAGE

 

 

Community Additions

ADD
Show:
© 2014 Microsoft