OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Each common dialog box class has a nested class called TData that contains some common housekeeping members and data specific to each type of common dialog box.
For example, TChooseColorDialog::TData has members for the color being chosen and an array for a set of custom colors. The following table lists the two members common to all TData nested classes.
Name | Type | Description |
Flags | uint32 | A set of common dialog box-specific flags that control the appearance and behavior of the dialog box. For example, CC_SHOWHELP is a flag that tells the color selection common dialog box to display a Help button the user can press to get context-sensitive Help. |
Error | uint32 | An error code used if an error occurred while processing a common dialog box; zero if no error occurred. Because Execute returns IDCANCEL both when the user chose Cancel and when an error occurred, you must check Error to determine whether an error actually occurred. |
Each common dialog box class has a constructor that takes a pointer to a parent window object, a reference to that class's TData nested class, and optional parameters for a custom dialog box template, title string, and module pointer.
Here is a sample fragment that constructs a common color selection dialog box:
After the user has chosen a new color in the dialog box and pressed OK, that color is placed in the Color member of the TData object.