非活动弹出窗口 [英] not active popup window

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

问题描述

我用 SW_SHOWNA 创建了一个弹出窗口.问题是当我将主窗口移动到弹出窗口后面时,弹出窗口会停留在同一个位置.有什么办法可以捕捉到弹出窗口后面主窗口标题栏(或其他技术)的点击并关闭弹出窗口?

I've created a popup window with SW_SHOWNA. The problem is when I move the main window behind the popup window the popup window stays at the same place. Is there any way to catch the click on the title bar (or other technique) of the main window behind the popup window and to close the popup window?

非常感谢!

迈克.

推荐答案

是的,就去做吧.但是,我不会对点击做出反应,因为它会使您的行为受鼠标限制.根据您的描述,您似乎想在窗口移动时关闭弹出窗口,因此请改为捕获该消息 (WM_WINDOWPOSCHANGING).这也将捕获键盘启动的移动.

Yes, just do it. I would however not react to the click, as it makes your behavior mouse-bound. From your description, it seems you want to close the popup on a window move, so trap that message (WM_WINDOWPOSCHANGING) instead. This will catch keyboard-initiated moves as well.

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

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