HwndSourceHook 委托

定义

表示处理 Win32 窗口消息的方法。

public delegate IntPtr HwndSourceHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool % handled);
public delegate IntPtr HwndSourceHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled);
type HwndSourceHook = delegate of nativeint * int * nativeint * nativeint * bool -> nativeint
Public Delegate Function HwndSourceHook(hwnd As IntPtr, msg As Integer, wParam As IntPtr, lParam As IntPtr, ByRef handled As Boolean) As IntPtr 

参数

hwnd
IntPtr

nativeint

窗口句柄。

msg
Int32

消息 ID。

wParam
IntPtr

nativeint

消息的 wParam 值。

lParam
IntPtr

nativeint

消息的 lParam 值。

handled
Boolean

一个值,该值指示消息是否已处理。 如果处理了消息,请将该值设置为 true ;否则为 false

返回值

IntPtr

nativeint

相应的返回值取决于特定消息。 请参阅正在处理 Win32 消息的消息文档详细信息。

注解

AddHook使用此方法注册此处理程序以接收消息。

扩展方法

名称 说明
GetMethodInfo(Delegate)

获取一个对象,该对象表示由指定委托表示的方法。

适用于

另请参阅