ShowColorResDlg method (LEADDlgColor Control)

C++ Builder example

Delphi 4.0 example

 

Builder Syntax

int ShowColorResDlg(TWinControl* AOwnerCtrl);

Delphi Syntax

Function ShowColorResDlg (AOwnerCtrl: TWinControl ): L_INT;

Overview

Refer to Using Imaging Common Dialogs.

Remarks

Displays the Color Resolution dialog box, and gets the options for the ColorRes method.

The layout and action of the dialog depends on the flags set in the DlgFlags property. Possible options are:

Value

Meaning

DLG_COLORRES_AUTOPROCESS

[$00000001] Process the image on OK. The LEADImage property must be assigned a Main Control containing a valid bitmap before calling this method.

DLG_COLORRES_SHOW_CONTEXTHELP

[$00000002] Dialog should contain a context sensitive help icon.

DLG_COLORRES_SHOW_PREVIEW

[$00000004] Show a preview of the image in the dialog. The LEADImage property must be assigned a Main Control containing a valid bitmap before calling this method.

DLG_COLORRES_SHOW_TOOL_ZOOMLEVEL

[$00000008] Show the "Zoom to fit" and "Zoom Normal" toolbar buttons. The DLG_COLORRES_SHOW_PREVIEW flag must be set in order to show these buttons.

DLG_COLORRES_SHOW_ORDER

[$00000080] Show the color order in the dialog

DLG_COLORRES_SHOW_OPENPALFILE

[$00000100] Show the open palette button used to load LEAD palette files. LEAD palette files are created using the ShowCustomizePalette method.

If you include DLG_COLORRES_AUTOPROCESS or DLG_COLORRES_SHOW_PREVIEW in the DlgFlags property, the LEADImage property must be assigned a Main Control containing a valid bitmap before calling this method.

The following properties associated with this dialog:

BitsPerPixel property

PaletteFlags property

DitherFlags property

DlgFlagsEx property

UserPaletteColors property

UserPaletteColorsCount property.

To include a Help button in the dialog, set the ShowHelpButton property to TRUE.

The ColorRes dialog can be seen below:

image\ColorRes.gif

See Also

Elements:

ColorRes method, ShowCustomizePaletteDlg method, BitsPerPixel property, PaletteFlags property, DitherFlags property, DlgFlagsEx property, ShowHelpButton property, ZoomToFit Property, DlgFlags property, EnableMethodErrors property.

Topics:

Imaging Common Dialogs: Properties, Methods, and Events