HeaderPane
Main
Hide
Share Link
Print

Announce

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);

Parameters

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_INFOInformation.
SFTDATE_ANNOUNCE_SUCCESSAn action completed.
SFTDATE_ANNOUNCE_WARNINGA warning.
SFTDATE_ANNOUNCE_ERRORAn error, for example a value the application refused.

fAssertive

TRUE to interrupt what the screen reader is saying, FALSE to queue the text.

Comments

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


Last Updated 11/26/2026 - (email)
© 2026 Softel vdm, Inc.