Message

Message

System. Windows .Forms (system. windows .forms.dll) struct

This value type wraps a Win32 message, and is used in message filtering (through the Application.AddMessageFilter() method) and Control.WndProc() message processing. Obviously, this is very closely bound to the operating system, and you should only use this sort of message processing in interop applicationstypically, when you are wrapping a Win32 control for your own purposes. You can retrieve the HWnd , LParam , WParam , and Msg ID. You can also set the Result to be returned to Windows if you handle the message.

You shouldn't create instances of this class directly, but instead use the static Create() factory method, which ensures that the message is properly initialized .

 public struct  Message  {  // Public Instance Properties  public IntPtr  HWnd  {set; get; }    public IntPtr  LParam  {set; get; }    public int  Msg  {set; get; }    public IntPtr  Result  {set; get; }    public IntPtr  WParam  {set; get; }  // Public Static Methods  public static Message  Create  (IntPtr  hWnd  , int  msg  , IntPtr  wparam  , IntPtr  lparam  );  // Public Instance Methods  public override bool  Equals  (object  o  );  // overrides ValueType  public override int  GetHashCode  ();  // overrides ValueType  public object  GetLParam  (Type  cls  );    public override string  ToString  ();  // overrides ValueType  } 

Hierarchy

System.Object System.ValueType Message

Passed To

Multiple types



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net