Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    short _FAR _gettextcolor( void );

Description:
    The _gettextcolor function returns the pixel value of the current text
    color.  This is the color used for displaying text with the  _outtext
    and  _outmem functions.  The default text color value is set to 7
    whenever a new video mode is selected.

Returns:
    The _gettextcolor function returns the pixel value of the current text
    color.

See Also:
    _settextcolor, _setcolor, _outtext, _outmem

Example:
    #include <conio.h>
    #include <graph.h>

    main()
    {
        int old_col;
        long old_bk;

        _setvideomode( _TEXTC80 );
        old_col = _gettextcolor();
        old_bk = _getbkcolor();
        _settextcolor( 7 );
        _setbkcolor( _BLUE );
        _outtext( " WATCOM \nGraphics" );
        _settextcolor( old_col );
        _setbkcolor( old_bk );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

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