TShape *myShape;
myShape = new TShape(Panel1);
myShape->Name = "Shape1";
myShape->Shape = stCircle;
myShape->Parent = Panel1;
myShape->Hint = "PLC Status";
myShape->OnMouseUp = OPCShapeMouseUp; // This is what I want
myShape->OnMouseDown = OPCShapeMouseDown; // This is what I want
This is how I declare and initialize my class:
TmyClass_Env *myClass;
myClass = new TmyClass_Env(MainForm);
myClass->Description = "My Test Class";
myClass->OnMessage = OnMyClassMessage; // This doesn't work
I'm not sure how to declare the OnMessage event within my class. I
would like the OnMessage event to pass an AnsiString that the parent
object can either display in a message box or print to a memo or a log
file. This OnMessage event would fire when called from within a member
function of TmyClass. Thank you for any help!