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

# XClosedCaptionGetProperties

> XClosedCaptionGetProperties

# XClosedCaptionGetProperties

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

## 語法

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

### 參數

*properties*   \_Out\_\
類型：[XClosedCaptionProperties\*](/zh-TW/reference/system/xaccessibility/structs/xclosedcaptionproperties)

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

### 傳回值

類型：HRESULT

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

## 備註

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

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

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

```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](/zh-TW/reference/system/xaccessibility/xaccessibility_members)

[XClosedCaptionProperties](/zh-TW/reference/system/xaccessibility/structs/xclosedcaptionproperties)

[XClosedCaptionSetEnabled](/zh-TW/reference/system/xaccessibility/functions/xclosedcaptionsetenabled)


## Related topics

- [XClosedCaptionGetProperties](/reference/system/xaccessibility/functions/xclosedcaptiongetproperties.md)
- [XClosedCaptionProperties](/reference/system/xaccessibility/structs/xclosedcaptionproperties.md)
