Associates a new image (icon or bitmap) with the button.
Syntax
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; );
Parameters
wParam The type of image to associate with the button. This parameter can be one of the following values: IMAGE_BITMAPIMAGE_ICONlParam A handle to the image to associate with the button.
Return Value
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?ResultYesYesShow icon only.NoYesShow icon and text.YesNoShow text only.NoNoShow text only
Message Information
HeaderDeclared in Winuser.h, include Windows.hMinimum operating systems Windows 95, Windows NT 4.0
See Also
BM_GETIMAGE
As Jakub correctly said, BS_ICON or BS_BITMAP needs to be set to display a bitmap. According to the table below, then there's no possiblity to have image and text at the same time??
Thanks