How to show pointer after touch interaction in Windows 8

When you touch the screen in Windows 8, the mouse pointer is hidden until you move the mouse (or other pointing device). This happens both on the desktop and on the Metro interfaces.

We have a program that allows people to move the mouse pointer using other input methods (like a joystick), so I need to make sure that the mouse pointer is visible.

How can I make the mouse pointer display?

+6
source share
2 answers

You can set the touch feedback flag.

[setting] ->[control panel]->[pen and touch]->[touch feekback] , the [show visual feedback when touch the screen] check box is ->[control panel]->[pen and touch]->[touch feekback] . If you cannot select this check box, you can show the mouse pointer without encoding when you touch the screen.

+1
source

You can apply mouse movement before launching the joystick using the Windows API:

 POINT p; GetCursorPos(&p); MOUSEINPUT mi; mi.dx = (LONG) ((px * 65535) / screen_width); mi.dy = (LONG) ((py * 65535) / screen_height); mi.mouseData = 0; mi.dwFlags = type | MOUSEEVENTF_ABSOLUTE; mi.time = 0; mi.dwExtraInfo = NULL; INPUT input; input.type = INPUT_MOUSE; input.mi = mi; SendInput(1, &input, sizeof(INPUT)); 
0
source

Source: https://habr.com/ru/post/914196/


All Articles