Class EventUser

3DS Max Plug-In SDK

Class EventUser

See Also: Class EventRouter, Class Interface.

class EventUser

Description:

This is a generic event notification system. The only two places this is currently used are for when the Delete key is pressed or the Delete menu item is selected, and when the Backspace key is pressed. The usage can be seen in \MAXSDK\SAMPLES\MODIFIERS\EDITPAT.CPP, where the Edit Patch modifier sets up for notification of Delete operations. It is also used in EDITSPL.CPP where it deals with deletion of selected items.

To use it:

1 Create an EventUser object.

2 Register the EventUser object with the appropriate router.

3 The EventRouter will call the EventUser's Notify() method when the event occurs.

4 When you're done with the EventUser object, call the EventRouter's UnRegister() method. This will delete the EventUser from the router's notification system.

5 If your code is part of a window proc, call the router's Register and UnRegister methods when the window receives WM_ACTIVATE messages. This will properly uncouple the notification system when the window is deactivated.

Methods:

Prototype:

virtual void Notify()=0;

Remarks:

Implemented by the Plug-In.

This is the proc called by the EventRouter when the event occurs.