Defines the name screen readers announce for the tab control.
C
int SftTabs_GetAccessibleName(HWND hwndCtl, LPTSTR lpszName, int cchMax); int WINAPI SftTabs_GetAccessibleName_A(HWND hwndCtl, LPSTR lpszName, int cchMax); int WINAPI SftTabs_GetAccessibleName_W(HWND hwndCtl, LPWSTR lpszName, int cchMax); void SftTabs_SetAccessibleName(HWND hwndCtl, LPCTSTR lpszName); void WINAPI SftTabs_SetAccessibleName_A(HWND hwndCtl, LPCSTR lpszName); void WINAPI SftTabs_SetAccessibleName_W(HWND hwndCtl, LPCWSTR lpszName);
C++
int CSftTabs::GetAccessibleName(LPTSTR lpszName, int cchMax) const; void CSftTabs::GetAccessibleName(CString& string) const; void CSftTabs::SetAccessibleName(LPCTSTR lpszName);
hwndCtl
The window handle of the tab control.
lpszName
GetAccessibleName: a pointer to the buffer that receives the name, or NULL to retrieve the length of the name.
SetAccessibleName: a pointer to the new name. NULL is the same as an empty name.
cchMax
The size of the buffer pointed to by lpszName in characters, including the terminating null character.
string
A reference to a CString object where the name will be returned.
GetAccessibleName returns the number of characters copied to the buffer, not including the terminating null character. If lpszName is NULL or cchMax is 0, it returns the length of the name instead, so an application can allocate a buffer of the required size (the length plus one). A name longer than the buffer is truncated.
The GetAccessibleName and SetAccessibleName functions define and retrieve the name screen readers such as Narrator, NVDA and JAWS announce for a tab control. The default is an empty name, for which the tab control is named "SftTabs". When a window contains several tab controls, an application should give each one a name, so the user can tell them apart. The tab labels are announced as the names of the individual tabs and are not affected.
When the name changes while a screen reader is attached, the tab control raises a UI Automation property-changed event, so the screen reader uses the new name. See Accessibility (Screen Readers).
SftTabs_GetAccessibleName and SftTabs_SetAccessibleName are available in SftTabs/DLL 7.02 and later.
SftTb.h maps the name without suffix to the _A (ANSI) or _W (Unicode) function, depending on whether UNICODE or _UNICODE is defined. The ANSI functions convert the text using the system code page.
See Also C/C++ API | C++ Classes | Notifications