SwapMouseButton

  BOOL SwapMouseButton(fSwap)    
  BOOL fSwap; /* reverse or restore buttons */

The SwapMouseButton function reverses the meaning of left and right mouse buttons.

Parameters

fSwap

Specifies whether the button meanings are reversed or restored. If this parameter is TRUE, the left button generates right-button mouse messages and the right button generates left-button messages. If this parameter is FALSE, the buttons are restored to their original meanings.

Return Value

The return value specifies the meaning of the mouse buttons immediately before the function is called. It is TRUE if the meaning was reversed. Otherwise, it is FALSE.

Comments

Button swapping is provided as a convenience to people who use the mouse with their left hands. The SwapMouseButton function is usually called by Control Panel only. Although an application is free to call the function, the mouse is a shared resource and reversing the meaning of the mouse buttons affects all applications.