Respond to an event
virtual void Update( CXlEventArgs* e ); |
A pointer to an event arguments object is sent to the Update method.
Derived classes should implement this function, which is the event handler for the XLL+ event model.
The code below defines a class derived from CXlRegisterFunctionsEventStaticObserver, implements an Update method which is called when the event occurs, and instantiates an instance of the new class.
// Define a class derived from CXlRegisterFunctionsEventStaticObserver class CMyRegisterFunctionsEventObserver : CXlRegisterFunctionsEventStaticObserver { public: // This method will be called during the XlRegisterFunctions event. virtual void Update(CXlEventArgs* e) { CXllApp::XlMessageBox(_T("About to register functions"), XlMessageBoxTypeInformation); } }; // Create an instance of the class CMyRegisterFunctionsEventObserver myObserver;
Header: xlpevents.h
CXlRegisterFunctionsEventStaticObserver Class | CXlRegisterFunctionsEventStaticObserver Methods