是否可以将 wParam 参数转换为实际的消息字符串?
我试图获取由消息的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是关于 WndProc 的问题吗?你说的是哪条消息?
WParam 通常用于发送附加到 Windows 消息的标志或信息,它不会告诉您消息是什么。
消息 ID (p_msg) 告诉您它是什么消息,例如“WM_CHAR”、“WM_KEYDOWN”等?你追求的是这些吗?如果是这样,您可以在此处下载枚举(C#,但易于转换):
或者当然只需查看 C++ windows 标头。
Is this is a question about WndProc? Which message are you talking about?
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):
Or of course just look in the C++ windows headers.