Pushes short application-status text to attached screen readers through a UI Automation notification event.
C
void SftDate_Announce(HWND hwndCtl, LPCTSTR lpszText, int kind, BOOL fAssertive); void WINAPI SftDate_Announce_A(HWND hwndCtl, LPCSTR lpszText, int kind, BOOL fAssertive); void WINAPI SftDate_Announce_W(HWND hwndCtl, LPCWSTR lpszText, int kind, BOOL fAssertive);
C++
void CSftDate::Announce(LPCTSTR lpszText, int kind, BOOL fAssertive); void CSftCalendar::Announce(LPCTSTR lpszText, int kind, BOOL fAssertive);
hwndCtl
The window handle of the date field control (SftDate) or the month calendar control (SftCalendar).
lpszText
The text to announce. An empty text or NULL announces nothing.
kind
The kind of announcement, one of the following values:
| SFTDATE_ANNOUNCE_INFO | Information. |
| SFTDATE_ANNOUNCE_SUCCESS | An action completed. |
| SFTDATE_ANNOUNCE_WARNING | A warning. |
| SFTDATE_ANNOUNCE_ERROR | An error, for example a value the application refused. |
fAssertive
TRUE to interrupt what the screen reader is saying, FALSE to queue the text.
The Announce function raises a UI Automation notification event on the control, which screen readers such as Narrator and NVDA speak. An application uses it to tell the user something the control itself doesn't show, for example why a date was refused in the NM_SFTDATE_VALUEVALIDATING notification.
Nothing happens if no UI Automation client is listening. See Accessibility (Screen Readers).
SftDate.h maps SftDate_Announce to SftDate_Announce_A (ANSI) or SftDate_Announce_W (Unicode), depending on whether UNICODE or _UNICODE is defined.
See Also C/C++ API | Categories | Notifications