public override void CreateInput() { base.CreateInput(); IntPtr windowHnd; window.GetCustomAttribute("WINDOW", out windowHnd); textInputHandler = new MessageHook(windowHnd); textInputHandler.MessageReceived += new EventHandler(textInputHandler_MessageReceived); inputKeyboard.KeyPressed += new MOIS.KeyListener.KeyPressedHandler(inputKeyboard_KeyPressed); inputMouse.MouseMoved += new MOIS.MouseListener.MouseMovedHandler(inputMouse_MouseMoved); inputMouse.MousePressed += new MOIS.MouseListener.MousePressedHandler(inputMouse_MousePressed); inputMouse.MouseReleased += new MOIS.MouseListener.MouseReleasedHandler(inputMouse_MouseReleased); MOIS.MouseState_NativePtr mouseState = inputMouse.MouseState; mouseState.width = viewport.ActualWidth; mouseState.height = viewport.ActualHeight; }