Middle click processing

In many Windiows applications (notepad, console window, Internet Explorer, Word), clicking the middle mouse (or the scroll wheel) creates a compass overlay and allows you to quickly scroll in any direction.

How do I get this behavior in my application? Is there an API, style, or message that makes this possible?

+4
source share
3 answers

What your appearance is part of IntelliMouse support, as far as I know, there is no direct winapi to implement this function. but you can create your own.

Check this article for a sample.

The Ultimate Toolbox Intellimouse Classes

+1
source

Take a look at http://msdn.microsoft.com/en-us/library/ms645610(v=VS.85).aspx . You can capture the WM_MBUTTONDOWN event in your message loop. Also, see the scrollable middle button in the text box .

+1
source

Not sure, but I think this is a link to "scrollwheel" "centrebutton" "panbutton" or a similar value or argument in the call options for the mouse control program. My mouse has the same object when I click on the central scroll wheel, and then when I finished clicking it again to return to normal scroll mode. Instead of invoking Windows, it would be better to use the invocation style of the language or script package used to develop the code, and the function will be activated by allowing the code to the hardware interface during compilation, JIT, or virtual machine runtime.

0
source

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


All Articles