XLL+ Class Library (6.3)

xldialog.h

Overview

xldialog.h contains classes that support native Excel dialogs.

The API is modelled as far is as possible on the MFC CDialog class, but with some substantial differences that reflect the more limited functionality of native Excel dialogs.

Classes

The main classes in xldialog.h are as follows:

Class Purpose
CXlDialog Dialog object. The developer may choose to inherit their own class from CXlDialog, and override the event handler methods.
CXlControl Push-button. Default action is to dismiss the dialog with a result code of TRUE, but the event can be trapped by overriding the OnOK() virtual method.

Controls

Each control on a dialog is of a class descended from CXlControl. The following control types are supported:

Class Purpose
CXlControlOK Push-button. Default action is to dismiss the dialog with a result code of TRUE, but the event can be trapped by overriding the OnOK() virtual method.
CXlControlCancel Push-button. Action is always to dismiss the dialog, with a result code of FALSE.
CXlControlStatic Static text field.
CXlControlTextEdit Text edit field. May contain any text.
CXlControlIntegerEdit Integer edit field. An error message is displayed if the user enters anything but an integer.
CXlControlNumberEdit Number edit field. An error message is displayed if the user enters anything but an number (integer or floating-point).
CXlControlFormulaEdit Formula edit field. The user can enter formula by typing or by selecting cells, as in the Excel formula bar.
CXlControlRefEdit Reference edit field. The user can enter an address by typing, or by selecting cells.
CXlControlOption Option button. Only one button in a group may be selected at any time. Selecting an option causes the overrideable event handler OnOption() to be called.
CXlControlOptionGroup Option button group. This invisible control is used to group together a sequence of option buttons.
CXlControlCheckBox Check-box. The user may click on the button to toggle its state between checked and unchecked. Checking a box causes the overrideable event handler OnCheckBox() to be called.
CXlControlGroupBox Static group box.
CXlControlListBox List box. The control is a single-selection list-box, and its API is modelled on that of the MFC class CListBox. Changing the selection causes the overrideable event handler OnListBox() to be called.
CXlControlIcon Icon image. The image may only be one of the three standard message box icons.

See Also

CXlDialog object | CXlControl object