通知图标消息不会给 MsgWaitForMultipleObjectsEx 留下深刻印象

发布于 2024-07-20 07:36:52 字数 535 浏览 3 评论 0原文

我使用 MsgWaitForMultipleObjectsEx() 进行消息循环,并使用 Shell_NotifyIcon 创建托盘图标。

事情是这样的:每当托盘图标向其所有者窗口发送消息时,该窗口不会立即接收消息,而是会排队直到任何其他类型的消息到达(例如 WM_MOUSEMOVE) )。

尽管我使用 QS_ALLEVENTS 调用 MsgWaitForMultipleObjectsEx() ,但由于某种原因,来自托盘图标的消息似乎无法使 MsgWaitForMultipleObjectsEx() 脱离等待状态 唤醒面具。

我使用 WM_USER + ... 作为 NOTIFYICONDATA::uCallbackMessage,并且我还尝试使用“具体”值(WM_MOVE,.. 。) 反而。 没有帮助。

有人遇到过这个问题吗?

I am using MsgWaitForMultipleObjectsEx() for my message loop, and Shell_NotifyIcon to create tray icons.

Here's the deal: Whenever the tray icon sends messages to it's owner window, the window won't receive the messages right away, instead they will get queued until any other type of message arrives (WM_MOUSEMOVE, for example).

Seems like the messages from the tray icon won't get MsgWaitForMultipleObjectsEx() out of the wait state for some reason, although I am calling MsgWaitForMultipleObjectsEx() with QS_ALLEVENTS wake mask.

I use WM_USER + ... for NOTIFYICONDATA::uCallbackMessage, and I also tried to use a "concrete" value (WM_MOVE,...) instead. Didn't help.

Did anyone ever faced this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羁客 2024-07-27 07:36:52

您没有尝试过使用 QS_ALLINPUT 而不是 QS_ALLEVENTS 吗?

Haven't you tried with QS_ALLINPUT instead of QS_ALLEVENTS?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文