获取指定区域刷新率 - GetWindowsFps
函数简介
获取指定区域的刷新率。
接口名称
GetWindowsFps
DLL调用
int GetWindowsFps(long ola, int x1, int y1, int x2, int y2);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| x1 | 整数型 | 查找区域的左上角X坐标 |
| y1 | 整数型 | 查找区域的左上角Y坐标 |
| x2 | 整数型 | 查找区域的右下角X坐标 |
| y2 | 整数型 | 查找区域的右下角Y坐标 |
示例
C++
long instance = CreateCOLAPlugInterFace();
// hwnd 为绑定的窗口句柄
// 获取整个窗口客户区的刷新率
int fps = GetWindowsFps(instance, 0, 0, 0, 0);
printf("当前刷新率: %d\n", fps);
Python
# 待补充
返回值
整数型:返回刷新率。
注意事项
- x1, y1, x2, y2 全传0时为窗口整个客户区。
