> ## 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.

# XClosedCaptionGetProperties

> XClosedCaptionGetProperties

# XClosedCaptionGetProperties

傳回目前隱藏式字幕的屬性。

## 語法

```cpp theme={null}
HRESULT XClosedCaptionGetProperties(  
         XClosedCaptionProperties* properties  
)  
```

### 參數

*properties*   \_Out\_\
類型：[XClosedCaptionProperties\*](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/structs/xclosedcaptionproperties.md)

函式傳回時，*properties* 會包含目前的隱藏式字幕屬性。

### 傳回值

類型：HRESULT

如果已啟用隱藏式字幕，且 *properties* 包含目前的 [XClosedCaptionProperties](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/structs/xclosedcaptionproperties.md)，則傳回 HRESULT。否則傳回錯誤碼。\
如需錯誤碼的清單，請參閱[錯誤碼](https://docs.xbox.com/zh-TW/reference/errorcodes.md)。

## 備註

> [!NOTE]
>
> 在時間敏感執行緒上呼叫此函式並不安全。如需詳細資訊，請參閱[時間敏感執行緒](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)。

若要讓此函式成功，必須啟用隱藏式字幕。
使用者必須在遊戲的 UI 中啟用隱藏式字幕功能。
如果使用者已啟用隱藏式字幕，您的遊戲可以呼叫 [XClosedCaptionSetEnabled](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/functions/xclosedcaptionsetenabled.md) 來標記隱藏式字幕的狀態。

下列範例示範如何傳回隱藏式字幕屬性。

```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

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 概念文件

* [時間敏感執行緒](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 另請參閱

[XAccessibility](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/xaccessibility_members.md)

[XClosedCaptionProperties](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/structs/xclosedcaptionproperties.md)

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


## Related topics

- [XClosedCaptionProperties](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/structs/xclosedcaptionproperties.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)
- [Xbox 無障礙指南 104](https://docs.xbox.com/zh-TW/build/game-principles/accessibility/xag-deep-dives/xag-104-subtitles-captions.md)
