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

# XClosedCaptionSetEnabled

> XClosedCaptionSetEnabled

# XClosedCaptionSetEnabled

폐쇄 자막의 활성화 또는 비활성화 여부를 나타내는 부울 값을 설정합니다.

## 구문

```cpp theme={null}
HRESULT XClosedCaptionSetEnabled(  
         bool enabled  
)  
```

### 매개 변수

*enabled*   \_In\_\
형식: bool

폐쇄 자막의 활성화 또는 비활성화 여부를 나타내는 부울 값입니다.

### 반환 값

형식: HRESULT

성공하면 HRESULT입니다. 그렇지 않으면 오류 코드를 반환합니다.\
오류 코드 목록은 [오류 코드](/reference/errorcodes)를 참조하세요.

## 설명

<Note>이 함수는 시간에 민감한 스레드에서 호출하기에 안전하지 않습니다. 자세한 내용은 [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)를 참조하세요.</Note>

이 함수가 성공하려면 폐쇄 자막이 활성화되어 있어야 합니다.
사용자는 게임 타이틀의 UI에서 폐쇄 자막 기능을 활성화해야 합니다.

폐쇄 자막을 활성화됨으로 표시하려면 *enabled*를 true 또는 1로 설정합니다.
폐쇄 자막을 비활성화됨으로 표시하려면 *enabled*를 false 또는 0으로 설정합니다.

다음 예제는 프로그래밍 방식으로 폐쇄 자막을 활성화하는 방법을 보여줍니다.

```cpp theme={null}
//사용자는 먼저 게임 타이틀의 UI에서 폐쇄 자막을 활성화해야 합니다. 그 후 게임 타이틀에서 부울 플래그를 설정할 수 있습니다.
if (SUCCEEDED(XClosedCaptionsSetEnabled(true)))
{
    // 폐쇄 자막이 성공적으로 활성화됨
}
```

## 요구 사항

**헤더:** XAccessibility.h

**라이브러리:** xgameruntime.lib

**지원 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 개념 문서

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 함께 보기

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

[XClosedCaptionProperties](/reference/system/xaccessibility/structs/xclosedcaptionproperties)

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


## Related topics

- [XClosedCaptionGetProperties](/ko/reference/system/xaccessibility/functions/xclosedcaptiongetproperties.md)
- [XSpeechToTextSetPositionHint](/ko/reference/system/xaccessibility/functions/xspeechtotextsetpositionhint.md)
- [XHighContrastGetMode](/ko/reference/system/xaccessibility/functions/xhighcontrastgetmode.md)
- [XSpeechToTextSendString](/ko/reference/system/xaccessibility/functions/xspeechtotextsendstring.md)
- [XAG 104: 자막과 캡션](/ko/build/game-principles/accessibility/xag-deep-dives/xag-104-subtitles-captions.md)
