Skip to main content

XClosedCaptionSetEnabled

Sets a Boolean value that indicates if closed captions are enabled or disabled.

Syntax

Parameters

enabled   _In_
Type: bool
A Boolean value indicating if closed captions are enabled or disabled.

Return value

Type: HRESULT HRESULT if successful. Otherwise, returns an error code.
For a list of error codes, see Error Codes.

Remarks

This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
For this function to be successful, closed captions must be enabled. The user must enable the closed captions feature in the UI of the Game title. To flag closed captions as enabled, set enabled to true or 1. To flag closed captions as disabled, set enabled to false or 0. The following example demonstrates how to enable closed captions programmatically.

Requirements

Header: XAccessibility.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

Conceptual documentation

See also

XAccessibility XClosedCaptionProperties XClosedCaptionGetProperties
Last modified on August 20, 2026