[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _gtColorSelect()
 Activate an attribute in the current CA-Clipper color setting
------------------------------------------------------------------------------
 C Prototype

     #include "gt.api"
     ERRCODE _gtColorSelect(
                             USHORT uiColorIndex
                           )

 Arguments

     uiColorIndex is the zero-based ordinal position in the current list
     of CA-Clipper color attributes.

 Returns

     _gtColorSelect() returns zero if successful.  Any other value indicates
     an error.

 Description

     _gtColorSelect() sets the color with which writes are displayed.  The
     specified color pair is obtained from the current list of color
     attributes.  Manifest constants for specifying uiColorIndex values,
     defined in the header file Color.ch, are shown in the table below:

     Color.ch Manifest Constants
     ------------------------------------------------------------------------
     Constant Name     Value     Color Setting
     ------------------------------------------------------------------------
     CLR_STANDARD      0         Standard
     CLR_ENHANCED      1         Enhanced
     CLR_BORDER        2         Border
     CLR_BACKGROUND    3         Background
     CLR_UNSELECTED    4         Unselected
     ------------------------------------------------------------------------

 Examples

     .  This example creates two functions that change the active
        color:

        #include "gt.api"

        void colorStandard( void );
        void colorEnhanced( void );

        void colorStandard( )
        {
           _gtColorSelect( CLR_STANDARD );
        }

        void colorEnhanced( )
        {
           _gtColorSelect( CLR_ENHANCED );
        }
        .
        .
        .
           _gtSetColorStr( "W+/B, B/W" );

           colorEnhanced( );
           _gtWrite( "Enhanced color (B/W)", 20 );

           colorStandard( );
           _gtWrite( "Standard Color (W+/B)", 21 );
        .
        .
        .

 Files  Library is CLIPPER.LIB, header file is Gt.api.


See Also: _gtGetColorStr() _gtIsColor() _gtSetColorStr() _gtWrite()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson