IMessageFilter IMessageFilter IMessageFilter IMessageFilter Interface

定义

定义消息筛选器接口。Defines a message filter interface.

public interface class IMessageFilter
public interface IMessageFilter
type IMessageFilter = interface
Public Interface IMessageFilter
派生

注解

此接口允许应用程序在将消息调度到控件或窗体之前捕获消息。This interface allows an application to capture a message before it is dispatched to a control or form.

在将消息调度到IMessageFilter窗体或控件之前,可以将实现接口的类添加到应用程序的消息泵,以筛选出消息或执行其他操作。A class that implements the IMessageFilter interface can be added to the application's message pump to filter out a message or perform other operations before the message is dispatched to a form or control. 若要将消息筛选器添加到应用程序的消息泵, AddMessageFilter请使用Application类中的方法。To add the message filter to an application's message pump, use the AddMessageFilter method in the Application class.

方法

PreFilterMessage(Message) PreFilterMessage(Message) PreFilterMessage(Message) PreFilterMessage(Message)

在调度消息之前将其筛选出来。Filters out a message before it is dispatched.

适用于

另请参阅