L
lodgue
Unregistered / Unconfirmed
GUEST, unregistred user!
例如:
function KeyboardHookHandler(iCode: Integer;
wParam: WPARAM;
lParam: LPARAM): LRESULT;
stdcall;
export;
const
_KeyPressMask = $80000000;
begin
Result := 0;
If iCode < 0 then
begin
Result := CallNextHookEx(hNextHookProc, iCode, wParam, lParam);
Exit;
end;
if ((lParam and _KeyPressMask) = 0) and
(GetKeyState(vk_Control) < 0) and (wParam = Ord('B')) then
begin
Result := 1;
<font color="blue">SetDownHotKey(True);</font>//是我自己定义的
一个在注册表中设置标记的函数。然后,在程序中找是否为设定的标志。但是觉得挺麻烦。不知能不能直接返回一个值。
end;
end;
function KeyboardHookHandler(iCode: Integer;
wParam: WPARAM;
lParam: LPARAM): LRESULT;
stdcall;
export;
const
_KeyPressMask = $80000000;
begin
Result := 0;
If iCode < 0 then
begin
Result := CallNextHookEx(hNextHookProc, iCode, wParam, lParam);
Exit;
end;
if ((lParam and _KeyPressMask) = 0) and
(GetKeyState(vk_Control) < 0) and (wParam = Ord('B')) then
begin
Result := 1;
<font color="blue">SetDownHotKey(True);</font>//是我自己定义的
一个在注册表中设置标记的函数。然后,在程序中找是否为设定的标志。但是觉得挺麻烦。不知能不能直接返回一个值。
end;
end;