Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.011 c
4-76216
Керик
2003-01-10 08:03
2003.02.24
Как заставить ras вызывать обработчик?


1-76022
dimonf
2003-02-12 11:33
2003.02.24
Подскажитн, как можно отключит BorderStyle в MDI окне!


1-75914
nikulin
2003-02-14 14:22
2003.02.24
Тип приложения????


1-75901
ltexcimer
2003-02-14 11:37
2003.02.24
SendMessage


4-76235
Matolch.
2003-01-12 12:54
2003.02.24
Как отработать ButtonUp левой на заголовке формы?




   Наверх