unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, xpman;
type
TForm1 =
class(TForm)
ProgressBar1: TProgressBar;
Button1: TButton;
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
OldProgressWndProc: TWndMethod;
procedure ProgressWndProc(
var Msg: TMessage);
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
procedure TForm1.ProgressWndProc(
var Msg: TMessage);
var
dc: HDC;
rect: TRect;
begin
OldProgressWndProc (Msg);
if Msg.Msg = WM_xyz
then
// Auf irgendeine Nachricht (siehe msdn oder Luckie ^^) reagieren ....
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
OldProgressWndProc := ProgressBar1.WindowProc;
// alte merken
ProgressBar1.WindowProc := ProgressWndProc;
// wndproc umbiegen
end;
end.