I want to make program for control game
because user can click in option menu, high score, exit and many many ect
If I protect mouse click may be this project will be success
can you introduce me about mouse hook
thank you... (^^)
how to disable mouse click in many location area (help plzz)
how to disable mouse click in many location area (help plzz)
\\ (^O^) //
Thank god for send you to Help me..
Thank god for send you to Help me..
in the game mouse still use..
but can't click in some button sush as option, exit game
...
I found mouse hook source code
but it's not global... can you introduce me how to write mouse hook with global or all program
but can't click in some button sush as option, exit game
...
I found mouse hook source code
Code: Select all
Global hhook
Procedure MouseProc(nCode, wParam, lParam)
*ms.MOUSEHOOKSTRUCT = lParam
SetGadgetText(0, "x: "+Str(*ms\pt\x))
SetGadgetText(1, "y: "+Str(*ms\pt\y))
If wParam = #WM_LBUTTONUP ; 205h
If *ms\pt\x >= 190 And *ms\pt\x <= 373 And *ms\pt\y >= 432 And *ms\pt\y <= 470
result = 1
;MessageRequester("Message", "Right button up hooked", 0)
EndIf
Else
result = 0
EndIf
ProcedureReturn result
EndProcedure
hInstance = GetModuleHandle_(0)
If OpenWindow(0, 0, 0, 300, 200, #PB_Window_SystemMenu, "Mouse hook example")
WindowID = WindowID()
If CreateGadgetList(WindowID)
TextGadget(0, 4, 4, 48, 24, "x: ")
TextGadget(1, 4, 32, 48, 24, "y: ")
EndIf
lpdwProcessId = GetWindowThreadProcessId_(WindowID, 0)
hhook = SetWindowsHookEx_(#WH_MOUSE, @MouseProc(), hInstance, lpdwProcessId)
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_EventCloseWindow
EndIf
UnhookWindowsHookEx_(hhook)
End
\\ (^O^) //
Thank god for send you to Help me..
Thank god for send you to Help me..