System.Windows.Forms.Control.MakeParam C# (CSharp) Method

MakeParam() static private method

static private MakeParam ( int low, int high ) : IntPtr
low int
high int
return System.IntPtr
		internal static IntPtr MakeParam (int low, int high){
			return new IntPtr (high << 16 | low & 0xffff);
		}

Usage Example

        private void SendParentNotify(IntPtr child, Msg cause, int x, int y)
        {
            Hwnd hwnd;

            if (child == IntPtr.Zero)
            {
                return;
            }

            hwnd = Hwnd.GetObjectFromWindow(child);

            if (hwnd == null)
            {
                return;
            }
            if (hwnd.Handle == IntPtr.Zero)
            {
                return;
            }
            if (ExStyleSet((int)hwnd.initial_ex_style, WindowExStyles.WS_EX_NOPARENTNOTIFY))
            {
                return;
            }
            if (hwnd.Parent == null)
            {
                return;
            }

            if (hwnd.Parent.Handle == IntPtr.Zero)
            {
                return;
            }

            if (cause == Msg.WM_CREATE || cause == Msg.WM_DESTROY)
            {
                SendMessage(hwnd.Parent.Handle, Msg.WM_PARENTNOTIFY, Control.MakeParam((int)cause, 0), child);
            }
            else
            {
                SendMessage(hwnd.Parent.Handle, Msg.WM_PARENTNOTIFY, Control.MakeParam((int)cause, 0), Control.MakeParam(x, y));
            }

            SendParentNotify(hwnd.Parent.Handle, cause, x, y);
        }
Control