HeaderPane
Main
Hide
Share Link
Print

SetAccessibleName

Define the name screen readers announce for the button.

C

void SftButton_SetAccessibleName(HWND hwndCtl, LPCTSTR lpszName);
void WINAPI SftButton_SetAccessibleName_A(HWND hwndCtl, LPCSTR lpszName);
void WINAPI SftButton_SetAccessibleName_W(HWND hwndCtl, LPCWSTR lpszName);

C++

void CSftButton::SetAccessibleName(LPCTSTR lpszName);

Parameters

hwndCtl

The window handle of the button control.

lpszName

The new name. NULL is the same as an empty name.

Comments

SetAccessibleName defines the name screen readers such as Narrator, NVDA and JAWS announce for the button. The default is an empty name, for which screen readers announce the button text, else "Control #" followed by the button's dialog ID. A button that shows only a picture, or whose text alone does not say what it does, should be given a name. The button's accelerator key still comes from its text.

When the name changes while a screen reader is attached, the button raises a UI Automation property-changed event, so the screen reader uses the new name. See Accessibility (Screen Readers).

SftButton.h maps the name without suffix to the _A (ANSI) or _W (Unicode) function, depending on whether UNICODE or _UNICODE is defined. The ANSI function converts the name using the system code page. SetAccessibleName is available in SftButton/DLL 3.02 and later.

See Also GetAccessibleName | Accessibility (Screen Readers) | Text and Fonts


Last Updated 12/03/2026 - (email)
© 2026 Softel vdm, Inc.