Eine Mouse / Keyb. Message "consumen" ?
-
Hi, ich hab noch ne frage, aber neues Thema deshalb neuer Thread

Ich habe in meiner DLL ein Keyb. hook und MouseHook. Nun würde ich gerne bestimmte Eingaben / Clicks abfangen und "zerstören". Quasi wenn der User ein "a" drückt soll das a nicht weitergeleitet (z.B. Editor) werden, sondern abgefangen und "consumiert" (bei Java kann man Events consumieren) werden. Also ich möchte weiterhin über Eingabe informiert werden, nur die Eingabe soll bis in meine HookFunktion gelangen, und nicht weiter :).
Ich dachte wenn man "CallNextHook" weglässt, würde das reichen? Aber irgendwie klappt das nicht...
Wie geht das am besten?
Danke für die Hilfe!
-
keiner eine idee?
-
Bist Du schon mal auf die Idee gekommen die Dokumentatrion zu KeyboardProc zu lesen?
If code is greater than or equal to zero, and the hook procedure did not process the message, it is highly recommended that you call CallNextHookEx and return the value it returns; otherwise, other applications that have installed WH_KEYBOARD hooks will not receive hook notifications and may behave incorrectly as a result. If the hook procedure processed the message, it may return a nonzero value to prevent the system from passing the message to the rest of the hook chain or the target window procedure.
-
danke funktioniert
