L_ClrDlg

#include "ltkrn.h"
#include "ltclr.h"

L_LTCLR_API L_INT L_ClrDlg(nDlg, hWnd, pClrHandle, pParams)

Displays a color space dialog box to initialize, and creates a color handle and CONVERSION_PARAMS data.

Parameters

L_INT nDlg

The color space dialog to display. Possible values are:

Value Meaning
DLG_CMYK CMYK dialog.
DLG_LAB LAB dialog.

L_HANDLE hWnd

Handle to parent window.

L_HANDLE * pClrHandle

Pointer to color handle to be set by the dialog. Pass NULL if it is not needed.

LPCONVERSION_PARAMS pParams

Pointer to a CONVERSION_PARAMS structure to be set by the dialog. Pass NULL if it is not needed.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This is another way of initializing the toolkit without using L_ClrInit. You can use it to retrieve a Color handle and/or a CONVERSION_PARAMS structure, for use later in initialization or modification by L_ClrSetConversionParams.

Platforms

Win32, x64.

Required DLLs and Libraries

LTCLR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions

Topics

Example

This example opens the CMYK dialog and creates a color handle and CONVERSION_PARAMS data.

L_INT ClrDlgExample( 
   HWND hWnd, 
   HANDLE* pClrHandle) 
{ 
   L_INT nRet; 
   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 = L_ClrDlg(DLG_CMYK, hWnd, pClrHandle, &convparams); 
 
   return nRet; 
} 

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

LEADTOOLS Color Conversion C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.