Message.HWnd 屬性

定義

取得或設定訊息的視窗控制代碼 (Window Handle)。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

屬性值

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.

適用於