1  /* swapmouse-win.c v1.0 - 2011-03-10
 2  Swap mouse buttons with one click (useful for lefties ...).
 3  Update: http://myc01.free.fr/swapmouse
 4  
 5  License: Public Domain Dedication (CC0 1.0)
 6    http://creativecommons.org/publicdomain/zero/1.0/
 7  
 8  Usage: Run "swapmouse-win.exe" in Windows with shortcut.
 9  */
10  
11  #include <windows.h>
12  
13  int WINAPI WinMain (HINSTANCE hThisInstance,
14                      HINSTANCE hPrevInstance,
15                      LPSTR lpszArgument,
16                      int nFunsterStil)
17  {
18      if (GetSystemMetrics (SM_SWAPBUTTON) == 0)
19      {
20        SwapMouseButton (TRUE);
21        return 1;
22      }
23      else
24      {
25        SwapMouseButton (FALSE);
26        return 0;
27      }   
28  }