The MASM Forum

General => The Campus => Topic started by: Magnum on April 24, 2016, 12:16:22 PM

Title: Swap mouse buttons
Post by: Magnum on April 24, 2016, 12:16:22 PM
This is supposed to swap the functions of the right and left mouse buttons.

It is not working.

Can someone help me ?

include \masm32\include\masm32rt.inc   

.CONST


.data
   
WaterMark   db  "SiegeWorks 2014 - Present"
%Date       db  " &@Date " ; Compile date
%time       db  " &@Time"

.data?

.code

start:

invoke SwapMouseButton,0

invoke ExitProcess,0

end     start
Title: Re: Swap mouse buttons
Post by: jj2007 on April 24, 2016, 12:41:39 PM
Works like a charm on Win7-64, and exactly as MSDN says:

include \masm32\MasmBasic\MasmBasic.inc      ; download (http://masm32.com/board/index.php?topic=94.0)
  Init
  invoke SwapMouseButton, 1
  MsgBox 0, "Test", "Hi", MB_OK
EndOfCode
Title: Re: Swap mouse buttons
Post by: Magnum on April 24, 2016, 01:38:13 PM
Thanks my friend. :-)

Noticed that you used 1.

I will try that.