public WindowsHook(IntPtr hWnd) { this.hWnd = hWnd; wndProcDelegate = WndProcHook; CreateHook(); }
public WM_TouchHook(IntPtr hWnd, HookType hookType) : base(hWnd, hookType) { this.scalingFactorX = 1f; this.scalingFactorY = 1f; DisableNativePressAndHoldGesture = true; this.mdTouchInputSize = Marshal.SizeOf(new TOUCHINPUT()); this.gestureDelegate = new Win32.WndProcDelegate(this.GestureWndProc); }
public WM_TouchHook(IntPtr hWnd, HookType hookType) : base(hWnd, hookType) //HookType.WH_CALLWNDPROC) //HookType.WH_GETMESSAGE) { DisableNativePressAndHoldGesture = true; // false; //HookInvoked += new HookEventHandler(TouchHookInvoked); mdTouchInputSize = Marshal.SizeOf(new TOUCHINPUT()); gestureDelegate = new Win32.WndProcDelegate(this.GestureWndProc); }
public ImGuiXNAFormsHook(IntPtr handleForm, HookDelegate hook) { HandleForm = handleForm; Hook = hook; _WndProcHook = WndProcHook; HandleHook = Win32.SetWindowsHookEx( 4, _WndProcHook, IntPtr.Zero, Win32.GetWindowThreadProcessId(HandleForm, IntPtr.Zero) ); }
public XNAFormsHook(IntPtr handleForm, HookDelegate hook) { HandleForm = handleForm; Hook = hook; _WndProcHook = WndProcHook; HandleHook = Win32.SetWindowsHookEx( Win32.HookType.WH_GETMESSAGE, // Was WH_CALLWNDPROC in ImGuiXNA _WndProcHook, IntPtr.Zero, Win32.GetWindowThreadProcessId(HandleForm, IntPtr.Zero) ); }
protected override void WndProc(ref Message m) { switch (m.Msg) { case Win32.WM_PARENTNOTIFY: DropDownHandle = m.LParam; oldWndProc = Win32.GetWindowLong(DropDownHandle, Win32.GWL_WNDPROC); newWndProc = new Win32.WndProcDelegate(ReplacementWndProc); Win32.SetWindowLong(DropDownHandle, Win32.GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(newWndProc)); break; } base.WndProc(ref m); }
void MobileRemoteUI_Load(object sender, EventArgs e) { _mProc = new Win32.WndProcDelegate(WndProc); _mOldWndProc = Win32.SetWindowLong(this.Handle, Win32.GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(_mProc)); System.Windows.Forms.Timer shownTimer = new System.Windows.Forms.Timer(); shownTimer.Interval = 100; shownTimer.Tick += new EventHandler(shownTimer_Tick); shownTimer.Enabled = true; MobileRemoteLoadEvent.Set(); SetIMEMode(); }
protected override void WndProc(ref System.Windows.Forms.Message m) { switch (m.Msg) { case Win32.WM_PARENTNOTIFY: DropDownHandle = m.LParam; oldWndProc = Win32.GetWindowLong(DropDownHandle, Win32.GWL_WNDPROC); newWndProc = new Win32.WndProcDelegate(ReplacementWndProc); Win32.SetWindowLong(DropDownHandle, Win32.GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(newWndProc)); break; } base.WndProc(ref m); }