我可以跟踪WM_ENTERMENULOOP/WM_INITMENU& WM_EXITMENULOOP消息是否有任何应用程序? [英] Can i track WM_ENTERMENULOOP / WM_INITMENU & WM_EXITMENULOOP messages of any application?

查看:70
本文介绍了我可以跟踪WM_ENTERMENULOOP/WM_INITMENU& WM_EXITMENULOOP消息是否有任何应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,
当我们进入焦点所在的应用程序菜单栏时,应用程序将WM_ENTERMENULOOP消息发送到Windows,并向我们显示菜单栏.当菜单栏隐藏时,应用程序会将WM_EXITMENULOOP消息发送到Windows.
当应用程序将WM_ENTERMENULOOP/WM_EXITMENULOOP消息发送到操作系统时,是否可以检测到事件. ?

是谁知道如何阅读Windows的Message Queue吗?"的人吗?
我可以用c#做到吗?


等待您的帮助之手,
sumit

Dear Friends,
When we goes to menubar of application in focus.The application sends WM_ENTERMENULOOP message to Windows and Menubar is shown to us. When Menubar hides an application sends WM_EXITMENULOOP Message to Windows.
Is it possible to detect event when WM_ENTERMENULOOP /WM_EXITMENULOOP message is sent to operating system by an application. ?

Is their anyone who knows "How to read Message Queue of Windows ?"
Can i do it by c# ?


Waiting for your Helpful hands,
sumit

推荐答案

我认为您需要Windows挂钩:

使用窗口消息在C#中实现全局系统挂钩 [使用C#中的钩子 [来自C#的低级Windows API钩子,可停止不必要的击键 [
I think you need windows hooks :

Using Window Messages to Implement Global System Hooks in C#[^]

Using Hooks from C#[^]

Low-level Windows API hooks from C# to stop unwanted keystrokes[^]

Hope it helps.


是的,可以做到,而且很容易. .NET中在名称空间System.Messaging下有一个Message和MessageQueue类.

在这里,供您参考:

http://www.cogin.com/articles/IntroductionToMSMQ.php [ http://msdn.microsoft.com/zh-我们/library/windows/desktop/ms711472%28v=vs.85%29.aspx [
最好的问候,
爱德华
Yes it can be done and it is easy. There is a Message and MessageQueue class in .NET under the namespace System.Messaging.

Here, for your reference:

http://www.cogin.com/articles/IntroductionToMSMQ.php[^]

http://msdn.microsoft.com/en-us/library/windows/desktop/ms711472%28v=vs.85%29.aspx[^]

You can see your message queue by installing it in windows features. After installation, open Computer Management and you will see Message Queue at the bottom of the list.

Best regards,
Eduard


这篇关于我可以跟踪WM_ENTERMENULOOP/WM_INITMENU& WM_EXITMENULOOP消息是否有任何应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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