Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

SetICMProfile function

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

Syntax


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 value

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 2000 does not have this limitation.

SetICMProfile supports only RGB profiles in compatible DCs.

Windows 95/98/Me: SetICMProfileW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h

Library

Gdi32.lib

DLL

Gdi32.dll

Unicode and ANSI names

SetICMProfileW (Unicode) and SetICMProfileA (ANSI)

See also

Basic Color Management Concepts
Functions
GetICMProfile
EnumICMProfiles

 

 

Community Additions

ADD
Show:
© 2015 Microsoft