Hallo,
Wenn es nur um 1 einzelnes Richedit oder so geht, dann ginge auch folgendes:
Delphi-Quellcode:
TForm1 = class(TForm)
Richedit1: TRichedit;
private
FOldWndProc: TWndMethod;
procedure NewWndProc(var Msg: TMessage);
public
{ Public-Deklarationen }
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
FOldWndProc := Richedit1.WndProc;
Richedit1.WndProc := NewWndProc;
end;
procedure TForm1.NewWndProc(var Msg: TMessage);
begin
FOldWndProc(Msg); // => "inherited"
if Msg.Msg = WM_SETFOCUS then
ShowMessage('SetFocus!');
end;
(Habs jetzt ausm Kopf getippt. Hoffe mal dass ich keine Fehler drin hab)
Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."