Control.ReflectMessage(IntPtr, Message) 方法

定義

將指定的訊息反映至繫結至指定控制代碼的控制項。Reflects the specified message to the control that is bound to the specified handle.

protected:
 static bool ReflectMessage(IntPtr hWnd, System::Windows::Forms::Message % m);
protected static bool ReflectMessage (IntPtr hWnd, ref System.Windows.Forms.Message m);
static member ReflectMessage : nativeint * Message -> bool
Protected Shared Function ReflectMessage (hWnd As IntPtr, ByRef m As Message) As Boolean

參數

hWnd
IntPtr

IntPtr,表示要反映訊息的目標控制項控制代碼。An IntPtr representing the handle of the control to reflect the message to.

m
Message

Message,表示要反映的 Windows 訊息。A Message representing the Windows message to reflect.

傳回

Boolean

如果已反映訊息,為 true,否則為 falsetrue if the message was reflected; otherwise, false.

備註

ReflectMessage 方法是基礎結構方法,通常不應該從您的程式碼呼叫。The ReflectMessage method is an infrastructure method and typically should not be called from your code.

如果 hWnd 參數不代表有效的控制項,則 ReflectMessage 方法會傳回 falseIf the hWnd parameter does not represent a valid control, the ReflectMessage method returns false.

由於 Windows 訊息會傳回至最上層視窗,因此會使用 ReflectMessage 方法將傳回訊息傳播至傳送訊息的控制項。Because Windows messages are returned to the top-level window, the ReflectMessage method is used to propagate the return message to the control that sent the message.

適用於

另請參閱