Version: |
5.0 |
Description: |
Sets a COLORREF (RGB value) in the global color palette for the given color index. |
Declaration: |
|
C/C++ |
extern "C" COLORREF WINAPI VCGetColorRef(short*
iError, short iIndex); |
Delphi |
function VCGetColorRef (var iError: Smallint; iIndex: Smallint):
Longint; stdcall; |
ActiveX/COM |
Function GetColorRef(ByVal iIndex As Integer) As DWORD |
Parameters: |
iIndex - the color index from
0 to 255. |
Return Value: |
If VCGetColorRef succeeds, the return value is the COLORREF (RGB value)
for the specified index. If an error occurs, the return value is 0. |
iError Code: |
0 - Success |
Notes: |
Visual CADD™ has a customizable pallet of 256 colors that it uses to draw to the screen or printer. This pallet 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 pallet 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 an actual color value. Though VCSetColorRef allows the RGB values to be changed, this call only affects the current session of the program. If you want to change colors across Visual CADD™ sessions you need call VCSaveColorPalette. |
See Also: |
VCLoadColorPalette, VCSaveColorPalette, VCGetColorName, VCSetColorName, VCGetColorIndex, VCSetColorIndex |