XLL+ Class Library (6.3)

xlpevents.h

Overview

xlpevents.h contains definitions of all the event-related classes that implement the XLL+ unified event model.

The file is automatically included in the project files when the AppWizard creates the XLL+ project.

Classes

The table below lists the core classes declared in the header file.

Class Description
CXlEvent The base class for events. This class implements the Subject of the observer pattern.
CXlEventArgs The base class for the arguments passed with any event.
CXlEventObserver The template class for event observers. This class implements the Observer of the observer pattern.
CXlStaticEventObserver The base class for event observers that are created statically, and register themselves automatically.

Event classes

The table below lists the concrete event classes declared in the header file.

Class Description
CXllOpenEvent Occurs when the XLL is opened, after OnXllOpenEx().
CXllCloseEvent Occurs when the XLL is closed, before OnXllClose().
CXlRegisterFunctionsEvent Occurs before the XLL's add-in functions are registered.
CXlNewWorkbookEvent Occurs when a new workbook is created.
CXlSelectionChangeEvent Occurs when Excel's active cell selection is changed.
CXlBeforeDoubleClickEvent Occurs when the user double-clicks in a worksheet.
CXlBeforeRightClickEvent Occurs when the user right-clicks in a worksheet.
CXlSheetActivateEvent Occurs when a worksheet is activated.
CXlSheetDeactivateEvent Occurs when a worksheet is deactivated.
CXlCalculateEvent Occurs just after Excel has finished calculating a worksheet.
CXlSheetChangeEvent Occurs when a cell is changed in a worksheet.
CXlWorkbookOpenEvent Occurs when a workbook is opened.
CXlWorkbookActivateEvent Occurs when a workbook is activated.
CXlWorkbookDeactivateEvent Occurs when a workbook is deactivated.
CXlWorkbookBeforeCloseEvent Occurs when a workbook is about to be closed, and allows the event to be cancelled.
CXlWorkbookBeforeSaveEvent Occurs when a workbook is about to be saved, and allows the event to be cancelled.
CXlWorkbookNewSheetEvent Occurs when a new worksheet is added to a workbook.

Event argument classes

The table below lists the event argument classes declared in the header file.

Class Description
CXllOpenArgs An event argument class allowing the event to be cancelled.
CXlWorkbookEventArgs An event argument class containing only a workbook name.
CXlWorksheetEventArgs An event argument class containing only a complete worksheet name.
CXlRangeEventArgs An event argument class containing a complete worksheet name, and a range address.
CXlCancellableRangeEventArgs An event argument class containing a complete worksheet name, and a range address, which can be used to cancel the event.
CXlBeforeCloseEventArgs An event argument class specifying a workbook about to be closed, which can be used to cancel the event.
CXlBeforeSaveEventArgs An event argument class specifying a workbook about to be saved, which can be used to cancel the event.
CXlWorkbookNewSheetEventArgs An event argument class specifying a workbook and its new sheet.

Static observer classes

The table below lists the static observer classes declared in the header file. There is one class for each concrete event.

Class Description
CXllOpenEventStaticObserver Observes CXllOpenEvent.
CXllCloseEventStaticObserver Observes CXllCloseEvent.
CXlRegisterFunctionsEventStaticObserver Observes CXlRegisterFunctionsEvent.
CXlNewWorkbookEventStaticObserver Observes CXlNewWorkbookEvent.
CXlSelectionChangeEventStaticObserver Observes CXlSelectionChangeEvent.
CXlBeforeDoubleClickEventStaticObserver Observes CXlBeforeDoubleClickEvent.
CXlBeforeRightClickEventStaticObserver Observes CXlBeforeRightClickEvent.
CXlSheetActivateEventStaticObserver Observes CXlSheetActivateEvent.
CXlSheetDeactivateEventStaticObserver Observes CXlSheetDeactivateEvent.
CXlCalculateEventStaticObserver Observes CXlCalculateEvent.
CXlSheetChangeEventStaticObserver Observes CXlSheetChangeEvent.
CXlWorkbookOpenEventStaticObserver Observes CXlWorkbookOpenEvent.
CXlWorkbookActivateEventStaticObserver Observes CXlWorkbookActivateEvent.
CXlWorkbookDeactivateEventStaticObserver Observes CXlWorkbookDeactivateEvent.
CXlWorkbookBeforeCloseEventStaticObserver Observes CXlWorkbookBeforeCloseEvent.
CXlWorkbookBeforeSaveEventStaticObserver Observes CXlWorkbookBeforeSaveEvent.
CXlWorkbookNewSheetEventStaticObserver Observes CXlWorkbookNewSheetEvent.