HeaderPane
Main
Hide

SftTabs/DLL 7.0 Documentation

Share Link
Print

Announce

Pushes short application-status text to attached screen readers through a UI Automation notification event.

C

void SftTabs_Announce(HWND hwndCtl, LPCTSTR lpszText, DWORD flags);
void WINAPI SftTabs_Announce_A(HWND hwndCtl, LPCSTR lpszText, DWORD flags);
void WINAPI SftTabs_Announce_W(HWND hwndCtl, LPCWSTR lpszText, DWORD flags);

C++

void CSftTabs::Announce(LPCTSTR lpszText, DWORD flags = SFTTABS_ANNOUNCE_INFO);

Parameters

hwndCtl

The window handle of the tab control.

lpszText

The text to announce. A short, complete phrase describing an application status change - for example "Saved", "Tab closed", "All tabs dirty", "Switched to page 3". The text should be something the user would want spoken, not a verbose log message. An empty or NULL string is silently ignored.

flags

Defines the kind of announcement and its delivery priority. flags combines one kind value and, optionally, the SFTTABS_ANNOUNCE_ASSERTIVE priority override.

SFTTABS_ANNOUNCE_INFOInformational announcement, polite delivery. The assistive technology may dedup or drop the announcement if the user is currently interacting with other UI. This is the default.
SFTTABS_ANNOUNCE_SUCCESSAn action has completed successfully. Polite delivery.
SFTTABS_ANNOUNCE_WARNINGA notable but non-fatal situation the user should know about. Polite delivery.
SFTTABS_ANNOUNCE_ERRORAn action has been aborted or has failed. Polite delivery.
SFTTABS_ANNOUNCE_POLITEAlias for SFTTABS_ANNOUNCE_INFO describing the default (polite / deduped) delivery mode.
SFTTABS_ANNOUNCE_ASSERTIVEBit flag that can be combined with any of the kind values above (for example SFTTABS_ANNOUNCE_ERROR | SFTTABS_ANNOUNCE_ASSERTIVE) to override the assistive technology's normal drop / dedup policy. The announcement will preempt any pending utterance. Use sparingly and only for information the user must hear.

Comments

The Announce function pushes short application-status text to attached screen readers (Narrator, NVDA, JAWS, etc.) through a UI Automation notification event. The tab control itself does not render the text visually - Announce is a speech-only side channel intended for momentary status updates that would otherwise be invisible to users relying on assistive technologies.

Typical uses:

  • confirming a destructive action ("Tab closed", "All changes discarded"),
  • reporting an operation result ("Saved", "Export complete"),
  • reporting state transitions ("Switched to page 3 of 5"),
  • reporting progress milestones for long-running operations.

Announce has zero cost when no assistive technology is listening - the tab control queries UiaClientsAreListening before building the event and skips the call entirely otherwise. It is also a silent no-op on Windows versions earlier than Windows 10 version 1709 (build 16299), where UIA notification events are not supported. Empty or NULL text is likewise a no-op.

See Also C/C++ API | C++ Classes | Notifications


Last Updated 04/22/2026 - (email)
© 2026 Softel vdm, Inc.