An application sends a BM_GETIMAGE message to retrieve the handle of the image (icon or bitmap) associated with the button.
BM_GETIMAGE wParam = (WPARAM) fImageType; // image-type flag lParam = 0; // not used, must be zero
IMAGE_BITMAP
IMAGE_ICON
The return value is the handle of the image, if any; otherwise, it is NULL.