winapi - 未记录的 Windows 消息 0x0313 稳定吗? [英] winapi - Undocumented Windows message 0x0313 stable?

查看:17
本文介绍了winapi - 未记录的 Windows 消息 0x0313 稳定吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了这条未记录的 Windows 消息,十六进制代码:0x0313,当用户右键单击应用程序的任务栏按钮时发送.使用/捕获是否稳定?

I've found this undocumented windows message, hex code: 0x0313 that's sent when a user right-clicks on the app's taskbar button. Is this stable to use/capture?

推荐答案

不能保证,但在实践中它可能不会消失.

No guarantees, but in practice it will probably not disappear.

我在谷歌上搜索它只是为了确保它不是例如记录的 MFC 消息.

I googled it just to make sure it's not e.g. a documented MFC message.

一个结果,来自 http://delphi.about.com/od/vclwriteenhance/a/ttaskbarmenu.htm:

当您右键单击任务栏按钮时,Windows 会向相应的应用程序窗口发送一条未记录的消息 ($0313).WPARAM 未使用(零),LPARAM 包含屏幕坐标中的鼠标位置,采用通常的格式.默认情况下,WindowProc 通过在给定坐标处弹出系统菜单来处理此消息.

When you right-click on a taskbar button, Windows sends an undocumented message ($0313) to the corresponding application window. The WPARAM is unused (zero) and the LPARAM contains the mouse position in screen coordinates, in the usual format. By default, WindowProc handles this message by popping up the system menu at the given coordinates.

显然您可以使用它来弹出您自己的自定义菜单,但在此之前我会使用例如Spy++ 来检查它是否可能生成可以被处理的文档化消息.

Apparently you can use it to pop up your own custom menu, but before doing that I would use e.g. Spy++ to check whether possibly it generates documented messages that can be processed instead.

这篇关于winapi - 未记录的 Windows 消息 0x0313 稳定吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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