> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/enums/xclosedcaptionfontedgeattribute.md)

隱藏式字幕文字的字型邊緣屬性。

*FontStyle*\
類型：[XClosedCaptionFontStyle](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/enums/xclosedcaptionfontstyle.md)

隱藏式字幕文字的字型樣式。

*FontScale*\
類型：float

隱藏式字幕文字的字型縮放比例。

*Enabled*\
類型：bool

如果已啟用隱藏式字幕則為 True，否則為 false。

## 備註

若要擷取目前的隱藏式字幕屬性，請呼叫 [XClosedCaptionGetProperties](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/functions/xclosedcaptiongetproperties.md) 函式。
[XClosedCaptionGetProperties](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/functions/xclosedcaptiongetproperties.md) 函式會接受指向 **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](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/xaccessibility_members.md)

[XClosedCaptionFontEdgeAttribute](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/enums/xclosedcaptionfontedgeattribute.md)

[XClosedCaptionFontStyle](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/enums/xclosedcaptionfontstyle.md)

[XClosedCaptionGetProperties](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/functions/xclosedcaptiongetproperties.md)


## Related topics

- [XClosedCaptionGetProperties](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/functions/xclosedcaptiongetproperties.md)
- [XClosedCaptionFontStyle](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/enums/xclosedcaptionfontstyle.md)
- [XClosedCaptionFontEdgeAttribute](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/enums/xclosedcaptionfontedgeattribute.md)
- [XClosedCaptionSetEnabled](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/functions/xclosedcaptionsetenabled.md)
- [XColor](https://docs.xbox.com/zh-TW/reference/system/xgameruntimetypes/structs/xcolor.md)
