Defines the name screen readers announce for the tree control.
C
int SftTree_GetAccessibleName(HWND hwndCtl, LPTSTR lpszName, int cchMax); int WINAPI SftTree_GetAccessibleName_A(HWND hwndCtl, LPSTR lpszName, int cchMax); int WINAPI SftTree_GetAccessibleName_W(HWND hwndCtl, LPWSTR lpszName, int cchMax); void SftTree_SetAccessibleName(HWND hwndCtl, LPCTSTR lpszName); void WINAPI SftTree_SetAccessibleName_A(HWND hwndCtl, LPCSTR lpszName); void WINAPI SftTree_SetAccessibleName_W(HWND hwndCtl, LPCWSTR lpszName); int SftTreeSplit_GetAccessibleName(HWND hwndCtl, LPTSTR lpszName, int cchMax); int WINAPI SftTreeSplit_GetAccessibleName_A(HWND hwndCtl, LPSTR lpszName, int cchMax); int WINAPI SftTreeSplit_GetAccessibleName_W(HWND hwndCtl, LPWSTR lpszName, int cchMax); void SftTreeSplit_SetAccessibleName(HWND hwndCtl, LPCTSTR lpszName); void WINAPI SftTreeSplit_SetAccessibleName_A(HWND hwndCtl, LPCSTR lpszName); void WINAPI SftTreeSplit_SetAccessibleName_W(HWND hwndCtl, LPCWSTR lpszName);
C++
int CSftTree::GetAccessibleName(LPTSTR lpszName, int cchMax) const; void CSftTree::GetAccessibleName(CString& string) const; void CSftTree::SetAccessibleName(LPCTSTR lpszName); int CSftTreeSplit::GetAccessibleName(LPTSTR lpszName, int cchMax) const; void CSftTreeSplit::GetAccessibleName(CString& string) const; void CSftTreeSplit::SetAccessibleName(LPCTSTR lpszName);
hwndCtl
The window handle of the tree 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 tree control. The default is an empty name, for which the tree control is named "SftTree". When a window contains several tree controls, an application should give each one a name, so the user can tell them apart.
A split tree control is one data grid for screen readers, named using SftTreeSplit_SetAccessibleName.
When the name changes while a screen reader is attached, the tree control raises a UI Automation property-changed event, so the screen reader uses the new name. See Accessibility (Screen Readers).
SftTree_GetAccessibleName and SftTree_SetAccessibleName and the SftTreeSplit functions are available in SftTree/DLL 8.02 and later.
SftTree.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 | Categories | Notifications