CButton.SetImagemethod
Associates a new image (icon or bitmap) with the button.
Syntax
FUNCTION SetImage (BYVAL hButton AS HWND, BYVAL ImageType AS DWORD, BYVAL hImage AS HANDLE) AS HANDLE
Parameters
| Name | Description | |
|---|---|---|
hButton | The handle of the button control. | |
ImageType | The type of image to delete. This parameter can be one of the following values (se below): | |
hImage | Handle of the icon or bitmap. |
Return value
The return value is a handle to the image (icon or bitmap) previously associated with the button, if any; otherwise, it is NULL.
Description
Associates a new image (icon or bitmap) with the button. The return value is a handle to the image previously associated with the button, if any; otherwise, it is NULL.
Example
CButton.SetImage(hButton, IMAGE_BITMAP, hBmp) CButton.SetImage(hButton, IMAGE_ICON, hIcon)
Reference
- Include file
CButton.inc - Defined in AfxNova/CButton.inc:162
- Documented in Windows/WIndows Controls/CButton Class.md
- Topic: CButton Class