About custom dialog boxes

AFXDialog is the base class for the other dialog box classes in the toolkit. If none of the other dialog box classes suit your needs, you must derive your dialog box from AFXDialog and provide most of the dialog box processing yourself.

The AFXDialog class extends the FXDialog class by providing the following features:

  • Button flags that allow the automatic construction of action area buttons.

  • Option flags that control the placement of the action area. Option flags also determine whether to include a separator between the action area and the rest of the dialog box.

  • Message IDs for the various action area commit semantics.

  • Methods to add action area buttons manually.

  • Automatic handling of the No, Cancel, and Dismiss buttons. Automatic handling is also provided for the Close (X) button on the right hand side of the dialog box's title bar.

  • Automatic destruction of the dialog box after it is unposted.

See Action area for more details.