#include "ltwrappr.h"
L_INT LColor::ClrDlg(nDlg, hWnd, pParams);
Displays a color space dialog box to initialize color conversion class object and the CONVERSION_PARAMS structure.
The color space dialog to display. Possible values are:
Value | Meaning |
---|---|
DLG_CMYK | CMYK dialog. |
DLG_LAB | LAB dialog. |
Handle to parent window.
Pointer to a CONVERSION_PARAMS structure to be updated by the dialog. Pass NULL if it is not needed.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This is another way of initializing the toolkit without using LColor::Initialize. You can use it to initialize a color conversion class object and/or the CONVERSION_PARAMS structure, for use later in initialization or modification by LColor::SetConversionParams.
Required DLLs and Libraries
This example opens the CMYK dialog and creates a color handle and CONVERSION_PARAMS data.
L_INT LColor_ClrDlgExample(HWND hWnd)
{
L_INT nRet;
LColor lClr;
CONVERSION_PARAMS convparams; /* conversion options */
/* Conversion with options:
The conversion will be done with the options specified in the convparams variable*/
/* set the convparams size */
convparams.uStructSize = sizeof(CONVERSION_PARAMS);
/* we want to use the built in ICC conversion method and built in conversion */
/* use built in conversion and LEAD ICC Engine*/
convparams.nMethod = USE_BUILTIN | USE_ICC;
/* set the active conversion method */
convparams.nActiveMethod = USE_BUILTIN;
/* allocate a D50 white point option */
convparams.pWpoint = (LPWHITEPOINT)malloc(sizeof(WHITEPOINT));
/* D50 white point */
convparams.pWpoint->nWhitePoint = CIELAB_D50;
/* allocate a cmyk option */
convparams.pCmykParams = (LPCMYK_PARAMS)malloc(sizeof(CMYK_PARAMS));
convparams.pCmykParams->uStructSize = sizeof(CMYK_PARAMS);
convparams.pCmykParams->nMask = CMYK_GCR;
/* 17.5 % GCR value */
convparams.pCmykParams->nGcr_level = 175;
nRet = lClr.ClrDlg(DLG_CMYK, hWnd, &convparams);
return nRet;
}