SetICMProfile

[This is preliminary documentation and subject to change.]

The SetICMProfile function sets a specified color profile as the output profile for a specified device context (DC).

BOOL WINAPI SetICMProfile(
  HDC hDC, 
  LPTSTR lpFileName
);
 

Parameters

hDC
Specifies a device context in which to set the color profile.
lpFileName
Specifies the path name of the color profile to be set.

Return Values

If this function succeeds, the return value is TRUE.

If this function fails, the return value is FALSE.

Remarks

SetICMProfile associates a color profile with a device context. It becomes the output profile for that device context. The color profile does not have to be associated with any particular device. Device-independent profiles such as sRGB can also be used. If the color profile is not associated with a hardware device, it will be returned by GetICMProfile, but not by EnumICMProfiles.

Note that under Windows 95 or later, the PostScript device driver for printers assumes a CMYK color model. Therefore, all PostScript printers must use a CMYK color profile. Windows NT does not have this limitation.

SetICMProfile supports only RGB profiles in compatible DCs.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in icm.h.
  Import Library: Use gdi32.lib.

See Also

Color Management Overview, ICM 2.0 Functions, GetICMProfile, EnumICMProfiles