我如何区分用户按下了"X"或“密友"? [英] How can I distinguish that user has press "X" or “Close Group”?

查看:87
本文介绍了我如何区分用户按下了"X"或“密友"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我有Windows应用程序,当我按"X"或关闭"时,从GetMessage获取的hwnd为NULL.可以.但是当我打开某些Windows应用程序时,它们正在任务栏上建立组.当我选择"Windows XP可以关闭组吗?
如何区分用户是否按了"X"或关闭组"?

在此先感谢
M.H

Hi I have windows applications which when I press "X" or "Close" hwnd got from GetMessage is NULL. That is OK. But when I open some windows applications, they are building group on Taskbar. Which message will be sent when I select "Close Group" by windows XP?
How can I distinguish that user has press "X" or "Close Group"?

Thanks in advance
M.H

推荐答案

我怀疑所有关闭组所做的工作都是遍历所有受影响的窗口,并分别向每个窗口发送WM_CLOSE.换句话说,它的作用就像您分别进入每个窗口并单击[X].

那将是更可能的实现,而不是关闭并创建新的Windows消息并教每个应用程序如何处理它.正如其他人所建议的那样,请使用SPY ++进行验证时观察飞行的消息.
I suspect that all close group does is loop over all the windows affected and sends a WM_CLOSE to each of them individually. In other words, it acts just like you went to each windows separately and clicked [X].

That would be the more likely implementation instead of going off and creating a new windows message and teaching every application how to process it. As the other person suggested, use SPY++ to watch what messages fly by when you do that to verify.


这篇关于我如何区分用户按下了"X"或“密友"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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