获取顶层窗口句柄 - GetForegroundWindow
函数简介
获取顶层活动窗口句柄。
接口名称
GetForegroundWindow
DLL调用
long GetForegroundWindow(long ola);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
示例
long hwnd = GetForegroundWindow(instance);
if (hwnd != 0) {
printf("顶层活动窗口句柄: %ld\n", hwnd);
}
返回值
长整数型:顶层活动窗口的句柄。
