Restrict mouse movement over a specified window handle

后端 未结 2 868
鱼传尺愫
鱼传尺愫 2021-01-22 10:31

I\'m looking to simulate a kiosk mode for Safari on Windows. OSX will not work with my input hardware and Chrome\'s GPU acceleration is too slow for the machine I\'m using.

2条回答
  •  独厮守ぢ
    2021-01-22 11:16

    You can use the ClipCursor function to do this.

    Confines the cursor to a rectangular area on the screen. If a subsequent cursor position (set by the SetCursorPos function or the mouse) lies outside the rectangle, the system automatically adjusts the position to keep the cursor inside the rectangular area.

提交回复
热议问题