是否可以将 wParam 参数转换为实际的消息字符串?

发布于 2024-09-09 05:51:25 字数 64 浏览 0 评论 0原文

我试图获取由消息的 wParam 属性中返回的整数表示的实际系统消息。有没有办法做到这一点或可以实现这一点的功能?

I am trying to get the actual system messages that are represented by the intergers returned in the wParam property of the message. Is there anyway to do this or a function that can achieve this?

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

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

发布评论

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

评论(1

不美如何 2024-09-16 05:51:25

这是关于 WndProc 的问题吗?你说的是哪条消息?

LRESULT CALLBACK WndProc(HWND p_hwn,UINT p_msg,WPARAM p_wparam,LPARAM p_lparam)

WParam 通常用于发送附加到 Windows 消息的标志或信息,它不会告诉您消息是什么。

消息 ID (p_msg) 告诉您它是什么消息,例如“WM_CHAR”、“WM_KEYDOWN”等?你追求的是这些吗?如果是这样,您可以在此处下载枚举(C#,但易于转换):

http://www.codeproject.com/KB/cs/cswindowsmessages.aspx

或者当然只需查看 C++ windows 标头。

Is this is a question about WndProc? Which message are you talking about?

LRESULT CALLBACK WndProc(HWND p_hwn,UINT p_msg,WPARAM p_wparam,LPARAM p_lparam)

The WParam is generally used to send flags or info attached to a windows message, it doesn't tell you what the message is.

The message id (p_msg) tells you what message it is e.g. 'WM_CHAR', 'WM_KEYDOWN' etc? Is it these you are after? If so you can download an enumeration here (C# but easy to convert):

http://www.codeproject.com/KB/cs/cswindowsmessages.aspx

Or of course just look in the C++ windows headers.

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