cs_ssd
Messages postés50Date d'inscriptiondimanche 1 juin 2003StatutMembreDernière intervention31 août 2011
-
5 juin 2006 à 23:57
f0xi
Messages postés4205Date d'inscriptionsamedi 16 octobre 2004StatutModérateurDernière intervention12 mars 2022
-
6 juin 2006 à 00:18
Bonjour, comment faire pour desactiver le clic droit d'internet explorer , sous un Twebrowser ???
d'avance merci.
f0xi
Messages postés4205Date d'inscriptionsamedi 16 octobre 2004StatutModérateurDernière intervention12 mars 202235 6 juin 2006 à 00:18
si j'ai pas fait d'erreur en recopiant le code de mon programme :
var
HookID : THandle;
DisableRButton : boolean = true;
function MouseProc(nCode: integer; wParam, lParam: longint): longint; stdcall;
function GetClassNameEnh(Handle: Hwnd): string;
var
ClassName: PChar;
begin
getmem(ClassName, 40);
windows.GetClassName(Handle, ClassName, 40);
Result := ClassName;
Freemem(ClassName);
end;
var
P: TPoint;
begin
if (nCode < 0) then
Result := CallNextHookEx(HookID, nCode, wParam, lParam) else if DisableRButton and ((wParam WM_RBUTTONDOWN) or (wParam WM_RBUTTONUP)) then begin
GetCursorPos(P);
if Pos('Internet Explorer_', GetClassNameEnh(WindowFromPoint(P))) <> 0 then
Result := HC_SKIP
else
Result := CallNextHookEx(HookID, nCode, wParam, lParam);
end else
Result := CallNextHookEx(HookID, nCode, wParam, lParam);
end;