Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EVENTS IN DYNAMICALLY CREATED COMPONENTS

Status
Not open for further replies.

wimvanherp

Programmer
Mar 3, 2001
149
BE
Does anybody know how to declare events in dynamically created components ?

regards Wim Vanherp
Wim.Vanherp@myself.com
 
Greetinx!

Event handler definition (in H file):
void __fastcall TForm1::NMUDP1DataReceived(TComponent *Sender, int NumberBytes, AnsiString FromIP, int Port)

Code which put event handler to component (in CPP file):
TNMUDP1->OnDataReceived = NMUDP1DataReceived;

Event code (in CPP file):
void __fastcall TForm1::NMUDP1DataReceived(TComponent *Sender, int NumberBytes, AnsiString FromIP, int Port)
{

}
Happy programming!))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top