Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Technical Reference - <b>_gtcolorselect()</b> http://www.X-Hacker.org [<<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 specifing uiColorIndex values,
     defined in the header file Color.ch, are described 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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson