Help Center

CButton.SetTextmethod

Sets the text of a button.

WindowsmethodCButton.incdocumented

Syntax

FUNCTION SetText (BYVAL hButton AS HWND, BYVAL pwszText AS WSTRING PTR) AS BOOLEAN

Parameters

NameDescription
hButtonThe handle of te button control.
pwszTextThe new text.

Return value

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.

Description

Sets the text of a button.

Example

CButton.SetText(hButton, "Ok")

Reference

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