Autor Beitrag
nimoee
Hält's aus hier
Beiträge: 7

w2k
D5
BeitragVerfasst: Sa 20.09.03 18:01 
Hallo, ( gehört zu einer Komponente, deshalb jier )
folgendes Problem:

ich hab eine message abgefangen, bearbeite diese. Wie kann ich erreichen, dass die weitergeleitet wird, wenn ich fertig bin?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure UNSetRO(var Message: TWMSetFocus); message EM_SETREADONLY;

{...}

procedure TmaskEditL.UNSetRO(var Message: TWMSetFocus);
begin

{ dann tu ich irgend was}

end;

nimoee

Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
bIce
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 55



BeitragVerfasst: Sa 20.09.03 18:52 
Wohin willst Du denn die Nachricht weiterleiten?
worm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 135


D6 Prof
BeitragVerfasst: So 21.09.03 00:18 
Also wenn die Botschaft von dem Control bearbeitet werden soll, von dem Du deine Komponente abgeleitet hast, mach etwas in der Art:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TmaskEditL.UNSetRO(var Message: TWMSetFocus); 
begin 
  with Message do
    if IrgendwasBestimmtesWasIchAbfangenWill then 
      TuDasWasIchWill
    else
      inherited;
end;

_________________
In the beginning, the universe was created. This has made a lot of people very angry, and is generally considered to have been a bad move.
nimoee Threadstarter
Hält's aus hier
Beiträge: 7

w2k
D5
BeitragVerfasst: So 21.09.03 12:28 
hallo,

was ruft inherited denn auf?
Ich hab keine Routine überschrieben!
Die alte Ereignisbehandlungsroutine, die zu dem Ereignis gehört?
Woher weiss inherited das denn?

nimoee
worm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 135


D6 Prof
BeitragVerfasst: So 21.09.03 15:37 
Hmm, das stimmt... die Ereignisbehandlungsroutine müsste dann IMO genauso lauten wie vorher (also bei der Klasse, von der Du erbst). Was genau hast du denn vor?

_________________
In the beginning, the universe was created. This has made a lot of people very angry, and is generally considered to have been a bad move.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: So 21.09.03 21:29 
In diesem Fall sorgt das inherited dafür, dass die anderen Message-Handler der Vorfahren über das Eintreffen der Nachricht informiert werden (auch wenn diese unterschiedliche Namen haben)... macht also genau das was du wolltest!

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!