AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi Über Hook rechte Maustaste sperren
Thema durchsuchen
Ansicht
Themen-Optionen

Über Hook rechte Maustaste sperren

Ein Thema von yvesdaeschle · begonnen am 7. Jan 2005 · letzter Beitrag vom 7. Jan 2005
Antwort Antwort
yvesdaeschle

Registriert seit: 22. Nov 2004
Ort: Efringen
26 Beiträge
 
Delphi 6 Personal
 
#1

Re: Über Hook rechte Maustaste sperren

  Alt 7. Jan 2005, 15:24
Es geht!!

Ich Erstelle den Hook so: also mit WH_GETMESSAGE:

SetWindowsHookEx(WH_GETMESSAGE, MsgFilterFunc, HInstance, 0); Und ich prüfe die Kombination von Strg und der rechten Maustaste so:

Delphi-Quellcode:
if (TPMsg (lParam)^.message = WM_RBUTTONUP) then
begin
  if GetASYNCKeyState (VK_CONTROL) <> 0 then
    TPMsg (lParam)^.message := WM_NULL;
end;
Result := CallNextHookEx(MMFData.NextHook, Code, wParam, lParam);
Ich ändere ja den Parameter, macht das was, gegenüber den anderen Programmen die diesen Hook verwenden?

Zitat:
Return Value

If nCode is less than zero, the hook procedure must return the value returned by CallNextHookEx.

If nCode 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 _MOUSE 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 target window procedure.
Danke euch nochmal!
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:11 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz