PWB Extensions Help (ext.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Using Colors in Extensions
                                             Up Contents Index Back
─────PWB Extensions─────────────────────────────────────────────────────────
 
     PWB maintains an table of colors. Each color in the table has the
     following:
 
     Item            Description
 
     Index number    The number by which you can access the color
                     directly in extensions. A color index can be one of
                     the predefined color constants defined in EXT.H, or
                     it can be the index of a new color returned by
                     AddAColor.
                     See: AddAColor, Color Constants
 
     Name            The switch name by which you can assign the color
                     from PWB (with macros, TOOLS.INI, or PWB switches).
 
     Value           The color specification associated with the table
                     entry. The value uses the standard MS-DOS color
                     scheme (one byte with the foreground color in the
                     low four bits and the background color in the high
                     four bits).
                     See: PWB Color Values
 
     You can use color indexes to assign a color to a block of text.
     See: GetColor, PutColor, SetColor, SetHiLite
 
     To set the value for a newly created color entry, use
     SetEditorObject:
 
          SetEditorObject( RQ_COLOR | myindex, 0, &myvalue );
 
     To set it indirectly, use fExecute:
 
          fExecute( "arg \"color:mycolor 18\" assign" );
                                    -♦-