Einzelnen Beitrag anzeigen

mr2

Registriert seit: 3. Mai 2003
140 Beiträge
 
Delphi 2006 Enterprise
 
#2

Re: alle window messages an meine form abfangen? aber wie?

  Alt 7. Nov 2003, 17:06
Hallo,

einfach WndProc überschreiben.
Delphi-Quellcode:
  TForm1 = class(TForm)
  protected
    procedure WndProc(var Message: TMessage); override;
    { Protected-Deklarationen }
  public
...

procedure TForm1.WndProc(var Message: TMessage);
begin
  if Message.Msg = WM_USER
  then ShowMessage('WM_USER')
  else inherited;
end;
[Edit]Syntax-Highlighting geht wieder [/Edit]
"... we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we don't know. But there are also unknown unknowns - the ones we don't know we don't know."
  Mit Zitat antworten Zitat