COLORRESDLGPARAMS

Summary

The COLORRESDLGPARAMS structure provides information used to initialize the dialog box created by the L_DlgColorRes function. After the user closes the dialog box, this structure is updated with information about the user's selections.

Syntax

typedef struct _COLORRESDLGPARAMS 
{ 
   L_UINT uStructSize; 
   pBITMAPHANDLE pBitmap; 
   L_BOOL bZoomToFit; 
   L_INT nBitsPerPixel; 
   L_UINT32 uColorResFlags; 
   HPALETTE hpalCustom; 
   L_UINT32 uDlgFlags; 
   L_UINT32 uDlgFlagsEx; 
   LTCOMMDLGHELPCB pfnHelpCallback; 
   L_VOID *pHelpCallBackUserData; 
} COLORRESDLGPARAMS,* LPCOLORRESDLGPARAMS ; 

Members

uStructSize

Size of this structure, in bytes. Use the sizeof operator to calculate this value.

pBitmap

Pointer to the bitmap handle that references the bitmap used for preview or processing.

bZoomToFit

Flag that indicates the initial zoom level for previewing the image. Possible values are:

Value Meaning
TRUE Set the initial zoom level to "Zoom to fit".
FALSE Set the initial zoom level to "Normal (1:1)".

nBitsPerPixel

A variable to be updated with the bits per pixel value entered in the dialog. Set this to indicate the initial value for the dialog.

uColorResFlags

A variable to be updated with the color resolution flags entered through the dialog. Setting this before calling the function has no effect. This will be one of the following:

Value Meaning
CRF_FIXEDPALETTE [0x01] Use the fixed palette.
CRF_OPTIMIZEDPALETTE [0x02] Create an optimized palette. Or, if you supply a palette in the pPalette or hPalette parameter, but not both, supply optimized colors for specified entries in the palette.
CRF_NETSCAPEPALETTE [0x40] Use the fixed palette that is employed by Netscape Navigator and by Microsoft Internet Explorer.
CRF_USERHPALETTE [0x0100] Use the palette specified in the hPalette parameter.
CRF_IDENTITYPALETTE [0x08] Insert the Windows system palette.
CRF_BYTEORDERBGR [0x04] Use BGR color order. This flag only has meaning when going to 16 bits per pixel or higher.
CRF_BYTEORDERRGB [0x00] Use RGB color. This flag only has meaning when going to 16 bits per pixel or higher.
CRF_NODITHERING [0x00000000] Use nearest color matching.
CRF_FLOYDSTEINDITHERING [0x00010000] Use Floyd-Steinberg dithering.
CRF_STUCKIDITHERING [0x00020000] Use Stucki dithering.
CRF_BURKESDITHERING [0x00030000] Use Burkes dithering.
CRF_SIERRADITHERING [0x00040000] Use Sierra dithering.
CRF_STEVENSONARCEDITHERING [0x00050000] Use Stevenson Arce dithering.
CRF_JARVISDITHERING [0x00060000] Use Jarvis dithering.
CRF_ORDEREDDITHERING [0x00070000] Use ordered dithering, which is faster but less accurate than other dithering methods.
CRF_CLUSTEREDDITHERING [0x00080000] Use clustered dithering.

hpalCustom

A handle to a palette to be updated with a custom palette entered through the dialog. This member is valid only when CRF_USERHPALETTE is set in uColorResFlags.

uDlgFlags

User interface flags for this dialog, which determine the layout and action of the dialog. Possible values are:

Value Meaning
DLG_COLORRES_AUTOPROCESS [0x00000001] process the image on OK. The pBitmap member of this structure should contain a valid bitmap.
DLG_COLORRES_SHOW_CONTEXTHELP [0x00000002] dialog should contain a context sensitive help icon.
DLG_COLORRES_SHOW_PREVIEW [0x00000004] show a preview of the image in the dialog. The pBitmap member of this structure should contain a valid bitmap.
DLG_COLORRES_SHOW_TOOL_ZOOMLEVEL [0x00000008] 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 [0x00000010] show the color order in the dialog
DLG_COLORRES_SHOW_OPENPALFILE [0x00000020] show the open palette button used to load LEAD palette files. LEAD palette files are created using the L_DlgCustomizePalette function.

uDlgFlagsEx

User interface flags for this dialog, which determine the options available in the dialog. Possible values are:

Value Meaning
DLG_COLORRES_SHOW_1BIT [0x00000001] 1-bit is an option in the dialog.
DLG_COLORRES_SHOW_2BIT [0x00000002] 2-bit is an option in the dialog
DLG_COLORRES_SHOW_3BIT [0x00000004] 3-bit is an option in the dialog
DLG_COLORRES_SHOW_4BIT [0x00000008] 4-bit is an option in the dialog
DLG_COLORRES_SHOW_5BIT [0x00000010] 5-bit is an option in the dialog
DLG_COLORRES_SHOW_6BIT [0x00000020] 6-bit is an option in the dialog
DLG_COLORRES_SHOW_7BIT [0x00000040] 7-bit is an option in the dialog
DLG_COLORRES_SHOW_8BIT [0x00000080] 8-bit is an option in the dialog
DLG_COLORRES_SHOW_12BIT [0x00000100] 12-bit is an option in the dialog
DLG_COLORRES_SHOW_16BIT [0x00000200] 16-bit is an option in the dialog
DLG_COLORRES_SHOW_24BIT [0x00000400] 24-bit is an option in the dialog
DLG_COLORRES_SHOW_32BIT [0x00000800] 32-bit is an option in the dialog
DLG_COLORRES_SHOW_48BIT [0x00001000] 48-bit is an option in the dialog
DLG_COLORRES_SHOW_64BIT [0x00002000] 64-bit is an option in the dialog
DLG_COLORRES_SHOW_BITALL [0x00003FFF] 1-bit to 64-bit are all options in the dialog.
DLG_COLORRES_SHOW_DITHER_NONE [0x00004000] no dithering is an option in the dialog.
DLG_COLORRES_SHOW_DITHER_FLOYD [0x00008000] Floyd dithering is an option in the dialog
DLG_COLORRES_SHOW_DITHER_STUCKI [0x00010000] stucki dithering is an option in the dialog
DLG_COLORRES_SHOW_DITHER_BURKES [0x00020000] burkes dithering is an option in the dialog
DLG_COLORRES_SHOW_DITHER_SIERRA [0x00040000] sierra dithering is an option in the dialog
DLG_COLORRES_SHOW_DITHER_STEVENSON [0x00080000] stevenson dithering is an option in the dialog
DLG_COLORRES_SHOW_DITHER_JARVIS [0x00100000] jarvis dithering is an option in the dialog
DLG_COLORRES_SHOW_DITHER_CLUSTER [0x00200000] clustered dithering is an option in the dialog
DLG_COLORRES_SHOW_DITHER_ORDERED [0x00400000] ordered dithering is an option in the dialog
DLG_COLORRES_SHOW_DITHER_ALL [0x007FC000] all dithering methods are options in the dialog
DLG_COLORRES_SHOW_PAL_FIXED [0x00800000] fixed palette is an option in the dialog
DLG_COLORRES_SHOW_PAL_OPTIMIZED [0x01000000] optimized palette is an option in the dialog
DLG_COLORRES_SHOW_PAL_IDENTITY [0x02000000] identity palette is an option in the dialog
DLG_COLORRES_SHOW_PAL_NETSCAPE [0x04000000] netscape palette is an option in the dialog
DLG_COLORRES_SHOW_PAL_SVGA [0x08000000] SVGA palette is an option
DLG_COLORRES_SHOW_PAL_UNIFORM [0x10000000] Uniform palette is an option
DLG_COLORRES_SHOW_PAL_MSIE [0x20000000] MSIE palette is an option
DLG_COLORRES_SHOW_PAL_ALL [0x3F800000] all palette options are included in the dialog

pfnHelpCallback

Pointer to an optional help callback function. If you do not wish to provide help to this dialog, use NULL as the value of this parameter. To provide help to this dialog, use the function pointer as the value of this parameter. The callback function must adhere to the prototype described in LTCOMMDLGHELPCB.

pHelpCallBackUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pHelpCallBackUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.

Usage

Help Version 22.0.2023.2.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Common Dialog C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.