OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The color common dialog box lets you choose and create colors for use in your application.
For example, a paint application might use the color common dialog box to choose the color of a paint bucket.
TChooseColorDialog::TData has several members you must initialize before constructing the dialog box object:
TData member | Type | Description |
Color | TColor | The selected color. When you execute the dialog box, Color specifies the default color. When the user closes the dialog box, Color specifies the color the user chose. |
CustColors | TColor* | A pointer to an array of sixteen custom colors. On input, it specifies the default custom colors. On output, it specifies the custom colors the user chose. |
In the following example, a color common dialog box is used to set the window object's Color member, which is used elsewhere to paint the window. Note the use of the TWindow::Invalidate() member function to force the window to be repainted in the new color.