活动窗口 [英] Active window

查看:103
本文介绍了活动窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序创建了很多窗口,其中大多数都有鼠标交互,但没有键盘。 当我滚动鼠标滚轮时,我想知道该位置的窗口是否处于活动状态(有一个彩色标题栏)。 我尝试过GetActiveWindow(),
,但总是带回MainFrame窗口的句柄。 有没有什么方法可以检查我的其他每个窗口,看看它们当时是否处于活动状态?

My program creates lots of windows, most of which have mouse interactions but not keyboard.  When I scroll the mouse wheel, I want to know whether the window at that location was active (had a colored title bar).  I have tried GetActiveWindow(), but that always comes back with a handle to the MainFrame window.  Is there any way I can check each of my other windows to see if they were active at that moment?

推荐答案

我认为你可以使用
GetForegroundWindow()


这篇关于活动窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆