XLL+ Class Library (7.0)

CXllCloseEventStaticObserver::Update

Respond to an event

virtual void Update(
   CXlEventArgs* e
);

Parameters

e

A pointer to an event arguments object is sent to the Update method.

Remarks

Derived classes should implement this function, which is the event handler for the XLL+ event model.

Example

The code below defines a class derived from CXllCloseEventStaticObserver, implements an Update method which is called when the event occurs, and instantiates an instance of the new class.

CopyC++
// Define a class derived from CXllCloseEventStaticObserver 
class CMyCloseEventObserver : CXllCloseEventStaticObserver
{
public:
    // This method will be called during the XllClose event. 
    virtual void Update(CXlEventArgs* e)
    {
        CXllApp::XlMessageBox(_T("Hello from XllClose"), 
            XlMessageBoxTypeInformation);
    }
};

// Create an instance of the class
CMyCloseEventObserver myCloseObserver;

Requirements

Header: xlpevents.h

See Also

CXllCloseEventStaticObserver Class | CXllCloseEventStaticObserver Methods