CreateColorSpaceA function (wingdi.h)

The CreateColorSpace function creates a logical color space.

Syntax

HCOLORSPACE CreateColorSpaceA(
  LPLOGCOLORSPACEA lplcs
);

Parameters

lplcs

Pointer to the LOGCOLORSPACE data structure.

Return value

If this function succeeds, the return value is a handle that identifies a color space.

If this function fails, the return value is NULL.

Remarks

When the color space is no longer needed, use DeleteColorSpace to delete it.

Windows 95/98/Me: CreateColorSpaceW 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.

Note

The wingdi.h header defines CreateColorSpace as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h
Library Gdi32.lib
DLL Gdi32.dll

See also