Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.06.30;
Скачать: CL | DM;

Вниз

SetWindowsHookEx   Найти похожие ветки 

 
delphimun   (2003-06-18 09:22) [0]

Хочу наконец разобраться с Hookами и в ф-ии SetWindowsHookEx мне непонятны назначение последних двух параметров, вот что я там настряпал, но не работает:
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;

procedure Button1Click(Sender: TObject);
function MyProc(code: integer; wParam: integer; lParam: Longint): Longint; stdcall;
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
h: hhook;
begin
h:=SetWindowsHookEx(wm_keydown,@myproc,0,GetCurrentThreadID);
end;
function MyProc(code: integer; wParam: integer; lParam: Longint): Longint; stdcall;
begin
showmessage("Key is downed!");
end;
end.
Хочу, чтобы если пользователь нажал клавишу вылезло собщение, как мне реализовать это?


 
Palladin ©   (2003-06-18 11:03) [1]

советую почитать
http://www.delphimaster.ru/articles/hooks/index.html



Страницы: 1 вся ветка

Текущий архив: 2003.06.30;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.011 c
6-97766
porky
2003-04-25 18:02
2003.06.30
local links?


3-97526
eLVik
2003-06-06 11:38
2003.06.30
Помогите разобраться SQL


14-97788
Артурчик
2003-06-13 10:57
2003.06.30
На source.ru праздник


8-97752
SuperMagic
2003-03-16 13:34
2003.06.30
Кривые второго порядка


14-97841
Chieftain
2003-06-12 12:44
2003.06.30
Вот так вот и уверуешь в переселение душ (c) by Шерлок Холмс