Page 1 of 1
Mouse Button on Side
Posted: Thu Oct 27, 2022 2:26 pm
by AUGE_OHR
hi,
in Firefox or EDGE i can use Button which are "on Side" of Mouse to go Backward or Forward WebSite
did someone know how to "ask" if they are press under HMG

Re: Mouse Button on Side
Posted: Fri Oct 28, 2022 8:25 am
by AUGE_OHR
hi,
have found out that
ALT + Cursor left
ALT + Cursor right
are doing same in Firefox / EDGE
so how to "use" it in own App

Re: Mouse Button on Side
Posted: Fri Oct 28, 2022 10:19 am
by edk
AUGE_OHR wrote: ↑Thu Oct 27, 2022 2:26 pm
hi,
in Firefox or EDGE i can use Button which are "on Side" of Mouse to go Backward or Forward WebSite
did someone know how to "ask" if they are press under HMG
Maybe something like this (I haven't tested):
Code: Select all
EventProcessAllHookMessage( EventCreate( EventHandler() ), .T.)
#define XBUTTON1 0x0001
#define XBUTTON2 0x0002
FUNCTION EventHandler()
LOCAL nHWnd := EventHWND()
LOCAL nMsg := EventMSG()
LOCAL nWParam := EventWPARAM()
LOCAL nLParam := EventLPARAM()
SWITCH nMsg
CASE WM_XBUTTONDOWN // https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-xbuttondown
cMessage := ''
IF HIWORD( nWParam ) = XBUTTON1
cMessage += "The first X button was clicked" + CRLF
ENDIF
IF HIWORD( nWParam ) = XBUTTON2
cMessage += "The second X button was clicked" + CRLF
ENDIF
IF LOWORD( nWParam ) = MK_XBUTTON1
cMessage += "The first X button is down" + CRLF
ENDIF
IF LOWORD( nWParam ) = MK_XBUTTON2
cMessage += "The second X button is down" + CRLF
ENDIF
MsgInfo ( cMessage )
EXIT
CASE WM_XBUTTONUP // https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-xbuttonup
cMessage := ''
IF HIWORD( nWParam ) = XBUTTON1
cMessage += "The first X button was clicked" + CRLF
ENDIF
IF HIWORD( nWParam ) = XBUTTON2
cMessage += "The second X button was clicked" + CRLF
ENDIF
IF LOWORD( nWParam ) = MK_XBUTTON1
cMessage += "The first X button is released" + CRLF
ENDIF
IF LOWORD( nWParam ) = MK_XBUTTON2
cMessage += "The second X button is released" + CRLF
ENDIF
MsgInfo ( cMessage )
EXIT
CASE WM_XBUTTONDBLCLK // https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-xbuttondblclk
cMessage := ''
IF HIWORD( nWParam ) = XBUTTON1
cMessage += "The first X button was clicked" + CRLF
ENDIF
IF HIWORD( nWParam ) = XBUTTON2
cMessage += "The second X button was clicked" + CRLF
ENDIF
IF LOWORD( nWParam ) = MK_XBUTTON1
cMessage += "The first X button was double-clicked" + CRLF
ENDIF
IF LOWORD( nWParam ) = MK_XBUTTON2
cMessage += "The second X button was double-clicked" + CRLF
ENDIF
MsgInfo ( cMessage )
EXIT
ENDSWITCH
RETURN NIL
Re: Mouse Button on Side
Posted: Fri Oct 28, 2022 11:14 am
by AUGE_OHR
hi Edward,
edk wrote: ↑Fri Oct 28, 2022 10:19 am
Maybe something like this (I haven't tested):
ah, YES WM_XBUTTONDOW