[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
);
If this function succeeds, the return value is TRUE.
If this function fails, the return value is FALSE.
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.
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.
Color Management Overview, ICM 2.0 Functions, GetICMProfile, EnumICMProfiles