HISTOGRAMDLGPARAMS

typedef struct _HISTOGRAMDLGPARAMS 
{ 
   L_UINT uStructSize; 
   pBITMAPHANDLE pBitmap; 
   L_UINT64 *puMasterHistogram; 
   L_UINT uMasterHistogramLen; 
   L_UINT64 *puRedHistogram; 
   L_UINT uRedHistogramLen; 
   L_UINT64 *puGreenHistogram; 
   L_UINT uGreenHistogramLen; 
   L_UINT64 *puBlueHistogram; 
   L_UINT uBlueHistogramLen; 
   COLORREF crMasterPen; 
   COLORREF crRedChannelPen; 
   COLORREF crGreenChannelPen; 
   COLORREF crBlueChannelPen; 
   L_UINT uHistogramFlags; 
   L_UINT32 uDlgFlags; 
   LTCOMMDLGHELPCB pfnHelpCallback; 
   L_VOID *pHelpCallBackUserData; 
} HISTOGRAMDLGPARAMS,* LPHISTOGRAMDLGPARAMS; 

The HISTOGRAMDLGPARAMS structure provides information used to initialize the dialog box created by the L_DlgHistogram function.

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 from which to determine the histograms. If this member is NULL, then the puMasterHistogram, puRedHistogram, puGreenHistogram and puBlueHistogram members must be valid. Likewise, if puMasterHistogram, puRedHistogram, puGreenHistogram and puBlueHistogram members are NULL, then pBitmap must contain a valid pointer to a bitmap handle. If this member was valid it will be considered as the source of histogram tables.

puMasterHistogram

An array of unsigned integers that charts the number of times each intensity level occurs in the image. Set this member to initialize the master histogram chart. If this member is NULL, then the pBitmap member must be valid and vice versa. The puMasterHistogram, puRedHistogram, puGreenHistogram and puBlueHistogram members must all be valid to be considered as the source of the histogram tables.

uMasterHistogramLen

Length of the puMasterHistogram array, in bytes.

puRedHistogram

An array of unsigned integers that charts the number of times each intensity level occurs in the image. Set this member to initialize the red histogram chart. If this member is NULL, then the pBitmap member must be valid and vice versa. The puMasterHistogram, puRedHistogram, puGreenHistogram and puBlueHistogram members must all be valid to be considered as the source of the histogram tables.

uRedHistogramLen

Length of the puRedHistogram array, in bytes.

puGreenHistogram

An array of unsigned integers that charts the number of times each intensity level occurs in the image. Set this member to initialize the green histogram chart. If this member is NULL, then the pBitmap member must be valid and vice versa. The puMasterHistogram, puRedHistogram, puGreenHistogram and puBlueHistogram members must all be valid to be considered as the source of the histogram tables.

uGreenHistogramLen

Length of the puGreenHistogram array, in bytes.

puBlueHistogram

An array of unsigned integers that charts the number of times each intensity level occurs in the image. Set this member to initialize the blue histogram chart. If this member is NULL, then the pBitmap member must be valid and vice versa. The puMasterHistogram, puRedHistogram, puGreenHistogram and puBlueHistogram members must all be valid to be considered as the source of the histogram tables.

uBlueHistogramLen

Length of the puBlueHistogram array, in bytes.

crMasterPen

COLORREF value that specifies the plotting color for the master channel histogram chart. To use this member, the DLG_HISTOGRAM_USERPENCOLORS flag must be set in uDlgFlags. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color.

crRedChannelPen

COLORREF value that specifies the plotting color for the red channel histogram chart. To use this member, the DLG_HISTOGRAM_USERPENCOLORS flag must be set in uDlgFlags. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color.

crGreenChannelPen

COLORREF value that specifies the plotting color for the green channel histogram chart. To use this member, the DLG_HISTOGRAM_USERPENCOLORS flag must be set in uDlgFlags. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color.

crBlueChannelPen

COLORREF value that specifies the plotting color for the blue channel histogram chart. To use this member, the DLG_HISTOGRAM_USERPENCOLORS flag must be set in uDlgFlags. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color.

uHistogramFlags

Histogram flags, used to determine which bits to use when calculating the histogram. This value is used only if the bitmap is 12 or 16-bit grayscale. Possible values are:

Value Meaning
HIST_LOWHIGH_BITS [0x0000] Use the only the bits between the LowBit and HighBit values stored in the bitmap handle.
HIST_ALL_BITS [0x0010] Use all the bits for calculating the histogram (the LowBit and HighBit values from the bitmap handle are ignored.

uDlgFlags

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

Value Meaning
DLG_HISTOGRAM_SHOW_CONTEXTHELP [0x00000001] dialog should contain a context sensitive help icon.
DLG_HISTOGRAM_SHOW_VIEWSTYLE [0x00000002] dialog should contain the view styles option.
DLG_HISTOGRAM_USERPENCOLORS [0x00000004] flag that indicates that the crMaster, crRedChannel, crGreenChannel, and crBlueChannel members are valid

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.

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

LEADTOOLS Common Dialog C API Help