> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XClosedCaptionProperties

> XClosedCaptionProperties

# XClosedCaptionProperties

描述隐藏式字幕属性。

## 语法

```cpp theme={null}
typedef struct XClosedCaptionProperties {  
    XColor BackgroundColor;  
    XColor FontColor;  
    XColor WindowColor;  
    XClosedCaptionFontEdgeAttribute FontEdgeAttribute;  
    XClosedCaptionFontStyle FontStyle;  
    float FontScale;  
    bool Enabled;  
} XClosedCaptionProperties  
```

### 成员

*BackgroundColor*\
类型：XColor

隐藏式字幕背景的颜色。

*FontColor*\
类型：XColor

隐藏式字幕文本字体的颜色。

*WindowColor*\
类型：XColor

隐藏式字幕窗口的颜色。

*FontEdgeAttribute*\
类型：[XClosedCaptionFontEdgeAttribute](/reference/system/xaccessibility/enums/xclosedcaptionfontedgeattribute)

隐藏式字幕文本的字体边缘属性。

*FontStyle*\
类型：[XClosedCaptionFontStyle](/reference/system/xaccessibility/enums/xclosedcaptionfontstyle)

隐藏式字幕文本的字体样式。

*FontScale*\
类型：float

隐藏式字幕文本的字体缩放比例。

*Enabled*\
类型：bool

如果启用了隐藏式字幕则为 True，否则为 false。

## 备注

若要检索当前的隐藏式字幕属性，请调用 [XClosedCaptionGetProperties](/reference/system/xaccessibility/functions/xclosedcaptiongetproperties) 函数。
[XClosedCaptionGetProperties](/reference/system/xaccessibility/functions/xclosedcaptiongetproperties) 函数以指向 **XClosedCaptionProperties** 结构的指针作为参数。

以下示例演示了如何检索隐藏式字幕属性。

```cpp theme={null}
XClosedCaptionProperties ccProperties;
if (SUCCEEDED(XClosedCaptionGetProperties(&ccProperties))
{
    // The game title can now access color and font settings in the ccProperties structure.
}
```

## 要求

**头文件：** XAccessibility.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XAccessibility](/reference/system/xaccessibility/xaccessibility_members)

[XClosedCaptionFontEdgeAttribute](/reference/system/xaccessibility/enums/xclosedcaptionfontedgeattribute)

[XClosedCaptionFontStyle](/reference/system/xaccessibility/enums/xclosedcaptionfontstyle)

[XClosedCaptionGetProperties](/reference/system/xaccessibility/functions/xclosedcaptiongetproperties)


## Related topics

- [XClosedCaptionGetProperties](/zh-CN/reference/system/xaccessibility/functions/xclosedcaptiongetproperties.md)
- [XClosedCaptionFontStyle](/zh-CN/reference/system/xaccessibility/enums/xclosedcaptionfontstyle.md)
- [XClosedCaptionFontEdgeAttribute](/zh-CN/reference/system/xaccessibility/enums/xclosedcaptionfontedgeattribute.md)
- [XClosedCaptionSetEnabled](/zh-CN/reference/system/xaccessibility/functions/xclosedcaptionsetenabled.md)
- [XColor](/zh-CN/reference/system/xgameruntimetypes/structs/xcolor.md)
