Version: |
5.0 |
Description: |
Load the VCADD color palette from a file |
Declaration: |
|
C/C++ |
extern "C" void WINAPI VCLoadColorPalette(short*
iError, char* szFilePath); |
Delphi |
procedure VCLoadColorPalette(var iError: Smallint; var szFilePath:
PAnsiChar); stdcall; |
ActiveX/COM |
Sub LoadColorPalette(ByVal szFilePath As String) |
Parameters: |
szFilePath - pointer to a NULL terminated string with the palette file name: |
Return Value: |
None |
iError Code: |
0 - Success |
Notes: |
Visual CADD™ has a customizable palette of 256 colors that it uses to draw to the screen or printer. This palette is used for all entity types in all drawings opened during a Visual CADD™ session. These colors are stored as RGB values that are read from the VGA.PAL in the System folder at program startup. Each palette entry has an index, a color (RGB value) and an optional name associated with it. Entities and global settings that have a color associated with them store a color index value and not the actual color value or name. Though VCSetColorName allows the color name to be changed, this call only affects the current session of the program. If you want the changes to exist across Visual CADD™ sessions you need to call VCSaveColorPalette. VCADD's 256 colors are specified in a palette file. By default, this file is named VGA.PAL and is located in the system folder. The VCLoadColorPalette and VCSaveColorPalette functions can be used to load and save the VCADD colors from a palette file, respectively. The szFilePath parameter can either contain just a filename (which does not need to be VGA.PAL) or a path name. If just a filename or a non-fully qualified path is provided, the System path will be searched for the palette file. Refer to the default VGA.PAL file for the required structure of a palette file. |
See Also: |
VCGetColorName, VCSetColorName, VCGetColorRef, VCSetColorRef, VCGetColorIndex, VCSetColorIndex |