unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls;
type
TForm1 = class(TForm)
TreeView1: TTreeView;
Memo1: TMemo;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
old_wp: TWndMethod;
procedure new_wp(var Message: TMessage);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
old_wp := TreeView1.WindowProc;
TreeView1.WindowProc := new_wp;
end;
procedure TForm1.new_wp(var Message: TMessage);
begin
if Message.Msg = WM_LBUTTONDBLCLK then
begin
// Memo1.Lines.Add('WM_NCLBUTTONDBLCLK');
end
else
old_wp(Message);
end;
end.