Message.HWnd 属性

定义

获取或设置消息的窗口句柄。Gets or sets the window handle of the message.

public:
 property IntPtr HWnd { IntPtr get(); void set(IntPtr value); };
public IntPtr HWnd { get; set; }
member this.HWnd : nativeint with get, set
Public Property HWnd As IntPtr

属性值

消息的窗口句柄。The window handle of the message.

注解

窗口句柄是唯一标识系统上的窗口的值。Window handle is a value that uniquely identifies a window on the system. 此属性返回窗口过程接收此消息的窗口的句柄。This property returns a handle of the window whose window procedure receives this message. 当你的代码需要与一些需要窗口句柄作为参数的本机 Windows API 函数交互时,此方法非常有用。It is useful when your code need to interact with some native Windows API functions that expect window handles as parameters.

适用于

另请参阅