What kind of events are you talking about?
You can define your own events in VC and make the object send messages according to the type of event you need. But you can also use the existing mechanisms (e.g. for drag and drop).
I think that the best way to do it is to derive a class from CCmdTarget. I would make this class a base class for all shapes.
You have to override the functionality of OnCmdMsg and call specific message handlers for each event you want treated.
You will find more details in the MSDN, at CCmdTarget.
I think that there is a sample in VC similar to what you want.
Anyway, the discussion above is valid only if you use Visual C++ 6.0. If you use Visual C++ .NET, things are much simpler.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.