PCMSCALLBACKW callback function (icm.h)

*PCMSCALLBACKW* (or ApplyCallbackFunction) is a callback function that you implement that updates the WCS configuration data while the dialog box displayed by the SetupColorMatchingW function is executing. The name ApplyCallbackFunction is a placeholder. The actual name of this callback function is supplied by your application using ICM.

Syntax

PCMSCALLBACKW Pcmscallbackw;

BOOL Pcmscallbackw(
  _tagCOLORMATCHSETUPW *unnamedParam1,
  LPARAM unnamedParam2
)
{...}

Parameters

unnamedParam1

Pointer to a COLORMATCHSETUPW structure that contains WCS configuration data.

unnamedParam2

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.

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 SetupColorMatchingW 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 COLORMATCHSETUPW structure that is passed to the SetupColorMatchingW 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 SetupColorMatchingW function, the application can store a value in the lParamApplyCallback member of the COLORMATCHSETUPW 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

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header icm.h

See also