BlisterUI.Input.MouseEventDispatcher.SetToHook C# (CSharp) Method

SetToHook() public static method

public static SetToHook ( ) : void
return void
        public static void SetToHook()
        {
            WMHookInput.OnMouseMotion += new MouseMotionHandler(EventInput_MouseMotion);
            WMHookInput.OnMouseButton += new MouseButtonHandler(EventInput_MouseButton);
            WMHookInput.OnMouseWheel += new MouseWheelHandler(EventInput_MouseWheel);
        }

Usage Example

Example #1
0
        public static void Initialize(GameWindow window)
        {
            if (created)
            {
                throw new InvalidOperationException("WinHook Can Only Initialize Once");
            }
            created = true;

            hookProcDelegate = HookProc;
            prevWndProc      = (IntPtr)SetWindowLong(window.Handle, GWL_WNDPROC, (int)Marshal.GetFunctionPointerForDelegate(hookProcDelegate));

            hIMC = ImmGetContext(window.Handle);

            MouseEventDispatcher.SetToHook();
        }