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

Вниз

Поставить на HOOK   Найти похожие ветки 

 
SPIRIT ©   (2002-12-25 01:41) [0]

вот код программки я отлавливаю код дополнительных кнопок "Volume Down","Volume UP","Mute" как мне можно эти действия положить на HOOK.

unit Unit1;

interface

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

type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
private
{ Private declarations }
public
procedure WMKEYDOWN(var msg: TMessage); message WM_KEYDOWN;
{ Public declarations }
end;

var
Form1: TForm1;
implementation

{$R *.dfm}
procedure TForm1.WMKEYDOWN(var msg: TMessage);
begin
if msg.LParam = 19791873 then
Label1.Caption := "Volume Down";
if msg.LParam = 18874369 then
Label1.Caption := "MUTE";
if msg.LParam = 19922945 then
Label1.Caption := "Volume Up";
end;
end;

end.


 
Song ©   (2002-12-25 08:21) [1]

WH_GETMESSAGE+SetWindowsHookEx()
Пример хука в статье и FAQ.



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

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

Наверх




Память: 0.46 MB
Время: 0.017 c
7-76213
Infinity
2002-12-24 11:36
2003.02.24
Несколько вопросов о COM


3-75792
Tornado
2003-02-06 08:33
2003.02.24
Выбор БД


1-75871
Kventin
2003-02-13 20:54
2003.02.24
Как спрятать модальную форму?


1-75892
Grom
2003-02-14 09:04
2003.02.24
DELPHI&EXEL Save As


1-76003
Zirus
2003-02-13 10:10
2003.02.24
form2 в панели задач