How do I convert LParam in a message from IntPtr to the Win32 type

Platform: WinForms|Category: Win32

Define the struct you want, for example RECT

	struct RECT
	{
  		public int left, top, right, bottom;
	}

Then use the Message.GetLPAram method

		RECT rc = (RECT)m.GetLParam( typeof(RECT) );