Help Center

CButton.GetImagemethod

Retrieves a handle to the image (icon or bitmap) associated with the button.

WindowsmethodCButton.incdocumented

Syntax

FUNCTION GetImage (BYVAL hButton AS HWND, BYVAL imgType AS LONG) AS HANDLE

Parameters

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

Return value

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

Description

Retrieves a handle to the image (icon or bitmap) associated with the button.

Example

DIM hBmp AS HBITMAP = CButton.GetIcon(hButton, IMAGE_BITMAP) DIM hIcon AS HICON = CButton.GetIcon(hButton, IMAGE_ICON)

Reference

  • Include file CButton.inc
  • Defined in AfxNova/CButton.inc:139
  • Documented in Windows/WIndows Controls/CButton Class.md
  • Topic: CButton Class