Associates a new image (icon or bitmap) with the button.
To send this message, call the SendMessage function as follows.
lResult = SendMessage( // returns LRESULT in lResult (HWND) hWndControl, // handle to destination control (UINT) BM_SETIMAGE, // message ID (WPARAM) wParam, // = (WPARAM) () wParam; (LPARAM) lParam // = (LPARAM) () lParam; );
The return value is a handle to the image previously associated with the button, if any; otherwise, it is NULL.
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: