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!