获取焦点窗口 - GetForegroundFocus
函数简介
获取顶层活动窗口中具有输入焦点的窗口句柄
接口名称
GetForegroundFocus
DLL调用
long GetForegroundFocus(long ola)
参数定义:
ola
(长整型数): OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。
示例:
long hwnd = GetForegroundFocus(ola);
if (hwnd != 0) {
printf("Focus window handle: %ld\n", hwnd);
}
COM调用
long GetForegroundFocus()
参数定义:
无参数
示例:
hwnd = ola.GetForegroundFocus()
messagebox("Focus window handle: " + hwnd)
返回值
长整型数:
- 返回具有输入焦点的窗口句柄