Mouse Hook to capture Left Double Click
Posted: Tue Jun 05, 2018 9:30 pm
Hi, i'm using this method to capture mouse clicks inside DVBViewer window, i'd like to change the position of Viewer window with Left Mouse Double Click, but can't find any solution.
Code: Select all
; Fluid Byte: http://www.purebasic.fr/english/viewtopic.php?p=236663#p236663
Procedure MouseHook(nCode, wParam, lParam)
If wParam = #WM_LBUTTONDOWN
SetGadgetText(0, "Left Mouse Clicked")
EndIf
If wParam = #WM_MBUTTONDOWN
SetGadgetText(0, "Middle Mouse Clicked")
;ProcedureReturn 1
EndIf
ProcedureReturn CallNextHookEx_(0, nCode, wParam, lParam)
EndProcedure
OpenWindow(0, 0, 0, 240, 140, "Mouse Hook", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
TextGadget(0, 10, 10, 180, 20, "")
hhkLLMouse = SetWindowsHookEx_(#WH_MOUSE_LL, @MouseHook(), GetModuleHandle_(0), 0)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
UnhookWindowsHookEx_(hhkLLMouse)