Help Center

CButton.SetIconmethod

Associates a new icon with the button.

WindowsmethodCButton.incdocumented

Syntax

FUNCTION SetIcon (BYVAL hButton AS HWND, BYVAL hIcon AS HICON) AS HICON

Parameters

NameDescription
hButtonThe handle of the button control.
hIconHandle of icon.

Return value

The return value is a handle to the icon previously associated with the button, if any; otherwise, it is NULL.

Description

Associates a new icon with the button.

Example

CButton.SetIcon(hButton, hIcon)

Reference

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