
# 设置投屏窗口位置和大小
#### 应用场景
该接口可设置当前投屏窗口的位置和大小。
#### 前提条件
已完成登录认证，参考[登录认证](https://support.huaweicloud.com/ideahub-api/ideahub_05_0013.html#ZH-CN_TOPIC_0000001309671840)。
#### 接口概述
本接口可以设置投屏窗口位置和大小，接口详情请参考[设置HDMI有线投屏窗口大小和位置](https://support.huaweicloud.com/ideahub-api/ideahub_05_0308.html#ZH-CN_TOPIC_0000001388775301)
#### 请求URL
/action.cgi?ActionID=WEB_SetCastWindowLayoutAPI
```
private static void WEB_SaveCfgParamAPI() {
        String uri = baseUrl + "/action.cgi?ActionID=WEB_SetCastWindowLayoutAPI";
        JSONObject obj = new JSONObject();  
        obj.put("acCSRFToken", token);       
        obj.put("shareType", 5);              
        obj.put("top", top*2);        
        obj.put("left", left*2);        
        obj.put("width", width*2);        
        obj.put("height", height*2);        
        LogUtils.getInstance().i(TAG, "setCastWindowLayout ");        
        JSONObject result = HttpClientUtil.post(uri, obj, null);
        return convertResult("WEB_SetCastWindowLayoutAPI", result);
   }
```
#### token的值为上述login操作获取的值，设置投屏窗口位置和大小成功返回报文
{"success":1,"data":""}
