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

# XGameStreamingHideTouchControls

> XGameStreamingHideTouchControls

# XGameStreamingHideTouchControls

要求所有已連線的串流用戶端裝置在觸控配置可見時將其隱藏。

## 語法

```cpp theme={null}
void XGameStreamingHideTouchControls();
```

### 傳回值

類型：void

## 備註

此 API 會要求所有已連線的遊戲串流用戶端移除任何顯示中的觸控覆疊控制項。如果玩家未串流遊戲，或是串流至未顯示觸控覆疊控制項的裝置，此函式不會執行任何動作。

若要顯示特定的觸控控制項配置，請呼叫 [XGameStreamingShowTouchControlLayout](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrollayout)。

每次呼叫 `XGameStreamingHideTouchControls` 都會透過網路傳送一則訊息，因此不應在每個畫面都呼叫它。請只在遊戲需要從螢幕上顯示觸控控制項的狀態轉換出來時，才呼叫此 API。

如果您的遊戲需要在**特定**已連線的串流用戶端裝置上隱藏觸控控制項配置，請考慮改用 [XGameStreamingHideTouchControlsOnClient](/zh-TW/reference/system/xgamestreaming/functions/xgamestreaminghidetouchcontrolsonclient)。

## 範例

```cpp theme={null}
void OnShowMenu()
{
    // This game has native touch support for the menu system, so hide touch overlay controls
    XGameStreamingHideTouchControls();
}

void OnDismissMenu()
{
    // Show the touch overlay controls which were previously on the screen before we hid them
    // due to bringing up the menu.
    XGameStreamingShowTouchControlLayout(m_currentTouchLayout);
}
```

## 需求

**標頭：** xgamestreaming.h

**程式庫：** xgameruntime.lib

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

## 另請參閱

[XGameStreamingShowTouchControlLayout](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrollayout)\
[XGameStreamingHideTouchControlsOnClient](/zh-TW/reference/system/xgamestreaming/functions/xgamestreaminghidetouchcontrolsonclient)\
[XGameStreaming](/zh-TW/reference/system/xgamestreaming/xgamestreaming_members#TouchAdaptation)


## Related topics

- [XGameStreamingHideTouchControls](/reference/system/xgamestreaming/functions/xgamestreaminghidetouchcontrols.md)
- [XGameStreamingHideTouchControlsOnClient](/reference/system/xgamestreaming/functions/xgamestreaminghidetouchcontrolsonclient.md)
