VCreateColormap - installs the colormap and updates the COLOR.COM file.
VCreateColormap installs the colormap and updates the COLOR.COM file.
The colormap is created when VCreateWindows is called at which time the
colormap ID is written to the COLORMAP.COM file. If the overlays and colormap
are inherited from another client, VCreateColormap gets the colormap of the
other client from COLOR.COM file and installs it as the current colormap.
If overlays and colormap are not inherited from another client,
VCreateColormap installs the colormap using default gray values with
overlays specified while creating VCreateWindows. In 3DVIEWNIX, the
visual classes considered are - GrayScale, PseudoColor, and DirectColor.
VCreateColormap can be called once for each process and should be called
after VOpenServer, VSetVisualClass, and VCreateWindows have been called.
0 - work successfully.
1 - memory allocation error.
2 - read error.
3 - write error.
4 - file open error.
252 - colormap is already created.
The visual classes considered are GrayScale, PseudoColor, and
If valid visual class is not available on the display device, or
VCreateWindows is not called earlier, VCreateColormap prints an error
message to the standard error stream, produces a core dump file and exits
from the current process.