把窗口坐标转换为屏幕坐标 @param hwnd 指定的窗口句柄 @param x 窗口X坐标 @param y 窗口Y坐标 @return 0: 失败 1: 成功
(int hwnd,Variant x,Variant y)
| 86 | * @return 0: 失败 1: 成功 |
| 87 | */ |
| 88 | public int ClientToScreen(int hwnd,Variant x,Variant y){ |
| 89 | Variant x1= new Variant(0,true); |
| 90 | Variant y1= new Variant(0,true); |
| 91 | Variant x2= new Variant(0,true); |
| 92 | Variant y2= new Variant(0,true); |
| 93 | int dm_ret = GetClientRect(hwnd,x1,y1,x2,y2); |
| 94 | if(dm_ret==1){ |
| 95 | int ck_x = x.getIntRef(); |
| 96 | int ck_y = y.getIntRef(); |
| 97 | int pm_x = ck_x + x1.getInt(); |
| 98 | int pm_y = ck_y + y1.getInt(); |
| 99 | x.putIntRef(pm_x); |
| 100 | x.putInt(pm_x); |
| 101 | y.putIntRef(pm_y); |
| 102 | y.putInt(pm_y); |
| 103 | return 1; |
| 104 | } |
| 105 | return 0; |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * 根据指定条件,枚举系统中符合条件的窗口,可以枚举到按键自带的无法枚举到的窗口 |
nothing calls this directly
no test coverage detected