ApplyCallbackFunction callback function

The function ApplyCallbackFunction is a callback function which updates the WCS configuration data while the dialog box displayed by the SetupColorMatching function is executing. The name ApplyCallbackFunction is a placeholder. The actual name of this callback function is supplied by the application using ICM.


BOOL ApplyCallbackFunction(
   COLORMATCHSETUP *pColorMatchSetup,
   LPARAM          lParam



Pointer to a COLORMATCHSETUP structure that contains WCS configuration data.


Contains a value supplied by the application.

Return value

If this function succeeds, the return value is TRUE.

If this function fails, the return value is FALSE. The callback function can set the extended error information by calling SetLastError.


The ApplyCallbackFunction function is used to change the WCS configuration for a device while the Color Management dialog box is displayed. The Color Management dialog box is displayed by the SetupColorMatching function.

If the callback function is provided, an Apply button is displayed in the lower right of the dialog box. When you select the Apply button, the callback function immediately updates the configuration for the device being set up. The Color Management dialog box remains on the screen.

An application supplies a callback function to WCS by storing the address of the callback function in the COLORMATCHSETUP structure that is passed to the SetupColorMatching function. The address is stored in the lPfnApplyCallback member of the COLORMATCHSETUP structure. The dwFlags member should be set to CMS_USEAPPLYCALLBACK, or the callback function will be ignored.

A value supplied by the application may be passed to the callback function. Prior to invoking the SetupColorMatching function, the application can store a value in the lParamApplyCallback member of the COLORMATCHSETUP structure. When the callback function is invoked, the value in the lParamApplyCallback structure member will be passed to the callback function in its lParam parameter.

The callback function is completely optional. If it is not supplied, the Apply button does not appear in the Color Management dialog box. Microsoft strongly recommends that your application supplies a callback function.


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]



See also

Basic Color Management Concepts