2
我想使用System.Windows.Forms.Application.AddMessageFilter的功能,但我的目標應用程序不使用Windows窗體。此功能會添加一個篩選器來監控Windows消息的路由。如果有人知道這是如何工作的,我不介意寫我自己的代碼來執行相同的功能。AddMessageFilter沒有Windows窗體?
帶GWL_WNDPROC的SetWindowLong隻影響收到的消息,我想影響發送的消息。 System.Windows.Forms.Application是靜態的,但用引發異常的IMessageFilter調用AddMessageFilter不起作用。