Gold mine of Visual C++ tricks!
Archive for July 18, 2008
How to swap the mouse buttons Programmatically?
Jul 18th
![]()
In our world, 87 percentage of population is right handed. Left handedness is so uncommon that the left handed population is about 13% only. But Microsoft have already taken care about the whole world, where you can choose the mouse to be left handed or right handed. See the mouse control panel screenshot.

But how can you do it programmatically?
![]()
Well, you can use the api – SwapMouseButton(). If you pass TRUE, then the mouse buttons will get swapped for a left handed person. If you pass FALSE, then the mouse buttons will be reset back for right hand use. See the code snippet.
// Swap mouse buttons for left hand use SwapMouseButton( TRUE ); // Reset mouse buttons for right hand use SwapMouseButton( FALSE );
![]()
Do you know that left handed guys can think in multi threaded where right hand guys can think only sequentially. have a look at Wiki. Its interesting.
![]()
Targeted Audience – Beginners