获取坐标所在窗口句柄 - GetPointWindow
函数简介
获取给定坐标的可见窗口句柄,可以获取到按键自带的插件无法获取到的句柄
接口名称
GetPointWindow
DLL调用
long GetPointWindow(long ola, int x, int y)
参数定义:
ola
(长整型数): OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。x
(整型数): 屏幕X坐标。y
(整型数): 屏幕Y坐标。
示例:
long hwnd = GetPointWindow(ola, 100, 200);
if (hwnd != 0) {
printf("Window handle at point (100,200): %ld\n", hwnd);
}
COM调用
long GetPointWindow(int x, int y)
参数定义:
x
(整型数): 屏幕X坐标。y
(整型数): 屏幕Y坐标。
示例:
hwnd = ola.GetPointWindow(100, 200)
messagebox("Window handle at point (100,200): " + hwnd)
返回值
长整型数:
- 返回指定坐标处可见窗口的句柄