Share via


ApplyCallbackFunction

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);

Parameters

  • pColorMatchSetup
    Pointer to a COLORMATCHSETUP structure that contains WCS configuration data.
  • lParam
    Contains a value supplied by the application.

Return Values

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.

Remarks

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.

Requirements

**  Windows NT/2000/XP/Vista:** Included in Windows 2000 and later.
**  Windows 95/98/Me:** Included in Windows 98 and later.
**  Header:** Declared in Icm.h.
**  Library:** Use Icmui.lib.

See Also

Basic Color Management Concepts, Functions, SetupColorMatching, COLORMATCHSETUP