Hi all,
I have created a class which contains many TShapes, TLabels and
TPanels. What I want to be able to do is when creating this class, is
passing in a pointer to OnMouseDown and OnMouseUp events. Thereby, the
user of the class can create their own event handlers for those events.
The idea is that by passing in the event handlers, these event
handlers are assigned to the appropriate events for each of the objects
in the class. However, I am having trouble declaring the constructor:
eg.
class SpecialButton : public TObject {
__published:
TShape *TLCorner;
TShape *TRCorner; // ...etc....
__public:
__fastcall SpecialButton(TMouseEvent mouseDown, TMouseEvent
mouseUp); // ??????
};
Your suggestions on this would be greatly appreciated.
Thanks,
Kyzer