- WM_MBUTTONDOWN message
- Parameters
- Return value
- Remarks
- X-Mouse Button Control для Windows
- Отзывы о программе X-Mouse Button Control
- How do I reassign mouse buttons?
- To reassign a button across all applications
- How do I reassign my mouse buttons for a specific application?
- To reassign a button for a specific program
- To use a button that has been reassigned for a specific program
- Responding to Mouse Clicks
- Mouse Coordinates
- Additional Flags
- Double Clicks
- Non-client Mouse Messages
- WM_RBUTTONDOWN message
- Parameters
- Return value
- Remarks
WM_MBUTTONDOWN message
Posted when the user presses the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
A window receives this message through its WindowProc function.
Parameters
Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
Value | Meaning |
---|---|
MK_CONTROL 0x0008 | The CTRL key is down. |
MK_LBUTTON 0x0001 | The left mouse button is down. |
MK_MBUTTON 0x0010 | The middle mouse button is down. |
MK_RBUTTON 0x0002 | The right mouse button is down. |
MK_SHIFT 0x0004 | The SHIFT key is down. |
MK_XBUTTON1 0x0020 | The first X button is down. |
MK_XBUTTON2 0x0040 | The second X button is down. |
The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
Return value
If an application processes this message, it should return zero.
Remarks
Use the following code to obtain the horizontal and vertical position:
As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order short (both represent signed values because they can take negative values on systems with multiple monitors). If the return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x- and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
X-Mouse Button Control для Windows
Оценка: |
4.33 /5 голосов — 9 |
Лицензия: | Бесплатная |
Версия: | 2.19.2 | Сообщить о новой версии |
Обновлено: | 25.05.2020 |
ОС: | Windows 10, 8.1, 8, 7, XP |
Интерфейс: | Английский, Русский |
Разработчик: | Phillip Gibbons |
Категория: | Расширения |
Загрузок (сегодня/всего): | 33 / 13 871 | Статистика |
Размер: | 2,61 Мб |
СКАЧАТЬ |
X-Mouse Button Control — удобное приложение, которое позволяет пользователю переназначить кнопки мыши по своему усмотрению, что несомненно будет очень полезно владельцам многокнопочных манипуляторов.
Благодаря данной утилите можно быстро задать функции кнопок мыши, как например Вырезать/Копировать/Вставить, Сделать двойной клик, Закрыть активное окно, Заблокировать ПК, Сделать скриншот экрана, Открыть панель управления и т.д. Назначенные команды можно сохранить в отдельные профили, чтобы быстро переключаться между ними при необходимости.
Кроме этого приложение позволяет настроить скорость и чувствительность мыши, включить/отключить залипание, активировать повышенную точность позиционирования курсора, менять местами кнопки для левшей и правшей, управлять буфером обмена, настраивать макросы и многое другое.
Примечание: Чтобы установить языковой пакет (русификатор), загрузите его и запустите, при этом должна быть установена и запущена программа XMBC. После чего он появится в раскрывающемся списке выбора языка на вкладке общих настроек.
С помощью небольшой программки Defender Control вы в один клик сможете отключать, включать и.
Punto Switcher — нужная программа, которая автоматически исправит текст, набранный не в той.
StartIsBack++ — полезная утилита для всех пользователей «десятки», которая вернет в интерфейс операционки привычное и знакомое меню Пуск из Windows 7.
Volume2 — очень удобная программа, дающая пользователю возможность управлять уровнем.
Небольшая портативная программа, которая позволяет настроить панель задач Windows 10.
CPU-Control — программа, которая позволяет распределять использование отдельных ядер.
Отзывы о программе X-Mouse Button Control
Дмитрий про X-Mouse Button Control 2.19.2 [03-12-2020]
Сама прога хорошая и дело не в ней, а в мышке. К сожалению во всех мышах средняя кнопка (что на прокрутке), конструктивно очень слабенькая, она конструктивно отличается от левой и правой кнопки мыши, поэтому «вешать» на среднюю кнопку двойной клик занятие бесперспективное.
| | Ответить
Dmitri про X-Mouse Button Control 2.19.2 [25-08-2020]
Надо следить какую раскладку клавиатуры включаете, на русской раскладке не работают сочетания кнопок английских.
| | Ответить
megacreep про X-Mouse Button Control 2.19.2 [01-08-2020]
хз как запустить. в конце установки ставишь галочку запустить и выкидывает на какойто сайт для доната. в папке тоже exe-шника нет, только куча непонятных файлов. КАК РАБОТАЕТ ТО.
| | Ответить
Null null про X-Mouse Button Control 2.18.8 [08-12-2019]
Назначил на левую кнопку клик средней. Тупил минут 15 XD
2 | 2 | Ответить
Евгений про X-Mouse Button Control 2.18.7 [30-11-2019]
How do I reassign mouse buttons?
Microsoft Mouse and Keyboard Center software provides default commands for all of the mouse buttons. You can reassign some buttons to different commands or keyboard shortcuts to better fit your work style. You can also disable buttons you might press accidentally, such as the wheel button. If you don’t have the software or want to learn more, go to Mouse & Keyboard Center Download.
To reassign a button across all applications
Using the mouse that you want to configure, start Microsoft Mouse and Keyboard Center.
Select basic settings.
Select the button that you want to reassign.
In the list of the button that you want to reassign, select a command.
To disable a button, select Disable this button.
You must assign the Click command to either the left or right button. You can assign this command to additional buttons if you want.
Reassigned button commands may not work as expected for some programs or games. Some programs or games may not support customized button assignments.
Some mouse models include specialized buttons that cannot be reassigned.
How do I reassign my mouse buttons for a specific application?
You can assign mouse buttons to perform different commands in different programs. For example, you can assign the same mouse button to activate Digital Ink when in PowerPoint, a macro when in a game, and the Magnifier when in any other application.
To reassign a button for a specific program
Using the mouse that you want to configure, start Microsoft Mouse and Keyboard Center.
Select the app-specific settings.
Click Add New button, select the program that you want.
If the program that you want is not on the list, click Manually Add a Program at the bottom, select the program.
In the button command list, select a command.
To use a button that has been reassigned for a specific program
Start the program and click the reassigned button.
Note: If you open a program by using the Run as administrator command, you will not have access to application-specific mouse button settings. Instead, the mouse will use the global mouse button assignments. To enable application-specific mouse button settings, open the application without administrator credentials, or log on to Windows as an administrator.
Responding to Mouse Clicks
If the user clicks a mouse button while the cursor is over the client area of a window, the window receives one of the following messages.
Message | Meaning |
---|---|
WM_LBUTTONDOWN | Left button down |
WM_LBUTTONUP | Left button up |
WM_MBUTTONDOWN | Middle button down |
WM_MBUTTONUP | Middle button up |
WM_RBUTTONDOWN | Right button down |
WM_RBUTTONUP | Right button up |
WM_XBUTTONDOWN | XBUTTON1 or XBUTTON2 down |
WM_XBUTTONUP | XBUTTON1 or XBUTTON2 up |
Recall that the client area is the portion of the window that excludes the frame. For more information about client areas, see What Is a Window?
Mouse Coordinates
In all of these messages, the lParam parameter contains the x- and y-coordinates of the mouse pointer. The lowest 16 bits of lParam contain the x-coordinate, and the next 16 bits contain the y-coordinate. Use the GET_X_LPARAM and GET_Y_LPARAM macros to unpack the coordinates from lParam.
These macros are defined in the header file WindowsX.h.
On 64-bit Windows, lParam is 64-bit value. The upper 32 bits of lParam are not used. The MSDN documentation mentions the «low-order word» and «high-order word» of lParam. In the 64-bit case, this means the low- and high-order words of the lower 32 bits. The macros extract the right values, so if you use them, you will be safe.
Mouse coordinates are given in pixels, not device-independent pixels (DIPs), and are measured relative to the client area of the window. Coordinates are signed values. Positions above and to the left of the client area have negative coordinates, which is important if you track the mouse position outside the window. We will see how to do that in a later topic, Capturing Mouse Movement Outside the Window.
Additional Flags
The wParam parameter contains a bitwise OR of flags, indicating the state of the other mouse buttons plus the SHIFT and CTRL keys.
Flag | Meaning |
---|---|
MK_CONTROL | The CTRL key is down. |
MK_LBUTTON | The left mouse button is down. |
MK_MBUTTON | The middle mouse button is down. |
MK_RBUTTON | The right mouse button is down. |
MK_SHIFT | The SHIFT key is down. |
MK_XBUTTON1 | The XBUTTON1 button is down. |
MK_XBUTTON2 | The XBUTTON2 button is down. |
The absence of a flag means the corresponding button or key was not pressed. For example, to test whether the CTRL key is down:
If you need to find the state of other keys besides CTRL and SHIFT, use the GetKeyState function, which is described in Keyboard Input.
The WM_XBUTTONDOWN and WM_XBUTTONUP window messages apply to both XBUTTON1 and XBUTTON2. The wParam parameter indicates which button was clicked.
Double Clicks
A window does not receive double-click notifications by default. To receive double clicks, set the CS_DBLCLKS flag in the WNDCLASS structure when you register the window class.
If you set the CS_DBLCLKS flag as shown, the window will receive double-click notifications. A double click is indicated by a window message with «DBLCLK» in the name. For example, a double click on the left mouse button produces the following sequence of messages:
In effect, the second WM_LBUTTONDOWN message that would normally be generated becomes a WM_LBUTTONDBLCLK message. Equivalent messages are defined for right, middle, and XBUTTON buttons.
Until you get the double-click message, there is no way to tell that the first mouse click is the start of a double click. Therefore, a double-click action should continue an action that begins with the first mouse click. For example, in the Windows Shell, a single click selects a folder, while a double click opens the folder.
Non-client Mouse Messages
A separate set of messages are defined for mouse events that occur within the non-client area of the window. These messages have the letters «NC» in the name. For example, WM_NCLBUTTONDOWN is the non-client equivalent of WM_LBUTTONDOWN. A typical application will not intercept these messages, because the DefWindowProc function handles these messages correctly. However, they can be useful for certain advanced functions. For example, you could use these messages to implement custom behavior in the title bar. If you do handle these messages, you should generally pass them to DefWindowProc afterward. Otherwise, your application will break standard functionality such as dragging or minimizing the window.
WM_RBUTTONDOWN message
Posted when the user presses the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
A window receives this message through its WindowProc function.
Parameters
Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
Value | Meaning |
---|---|
MK_CONTROL 0x0008 | The CTRL key is down. |
MK_LBUTTON 0x0001 | The left mouse button is down. |
MK_MBUTTON 0x0010 | The middle mouse button is down. |
MK_RBUTTON 0x0002 | The right mouse button is down. |
MK_SHIFT 0x0004 | The SHIFT key is down. |
MK_XBUTTON1 0x0020 | The first X button is down. |
MK_XBUTTON2 0x0040 | The second X button is down. |
The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
Return value
If an application processes this message, it should return zero.
Remarks
Use the following code to obtain the horizontal and vertical position:
As noted above, the x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order short (both represent signed values because they can take negative values on systems with multiple monitors). If the return value is assigned to a variable, you can use the MAKEPOINTS macro to obtain a POINTS structure from the return value. You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x- and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.