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

# XGameStreamingHideTouchControlsOnClient

> XGameStreamingHideTouchControlsOnClient

# XGameStreamingHideTouchControlsOnClient

要求指定的串流用戶端裝置在觸控配置可見時將其隱藏。

## 語法

```cpp theme={null}
void XGameStreamingHideTouchControlsOnClient(  
         XGameStreamingClientId client  
)  
```

### 參數

*client*   \_In\_\
類型：XGameStreamingClientId

要隱藏觸控控制項的串流用戶端裝置。

### 傳回值

類型：void

## 備註

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

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

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

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

## 範例

```C++ theme={null}
void OnShowMenu(XGameStreamingClientId client)
{
    // This game has native touch support for the menu system, so hide touch overlay controls
    XGameStreamingHideTouchControlsOnClient(client);
}

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

## 需求

**標頭：** xgamestreaming.h

**程式庫：** xgameruntime.lib

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

## 另請參閱

[XGameStreamingShowTouchControlLayoutOnClient](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrollayoutonclient)\
[XGameStreamingHideTouchControls](/zh-TW/reference/system/xgamestreaming/functions/xgamestreaminghidetouchcontrols)\
[XGameStreaming](/zh-TW/reference/system/xgamestreaming/xgamestreaming_members#TouchAdaptation)


## Related topics

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