Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_getvideoconfig() get current graphics environment</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _getvideoconfig()       Get current graphics environment

 #include   <graph.h>

 struct videoconfig far * far _getvideoconfig(config);
  struct videoconfig far *config;  Configuration information

    _getvideoconfig() returns the following information about the current
    graphics environment in struct videoconfig, defined in graph.h:

 struct videoconfig {
         short numxpixels;    Number of pixels on X axis
         short numypixels;    Number of pixels on Y axis
         short numtextcols;   Number of text columns available
         short numtextrows;   Number of text rows available
         short numcolors;     Number of actual colors
         short bitsperpixel;  Number of bits per pixel
         short numvideopages; Number of available video pages
         short mode;          Current video mode
         short adapter;       Active display adapter
         short monitor;       Active display monitor
         short memory;        Adapter video memory in K bytes
         };

       Returns:     There is no error return.

         Notes:     Several of the graphics routines use the information
                    obtained by _getvideoconfig(), so it should be called
                    near the beginning of the graphics program, after the
                    desired video mode has been selected.

                    See _setvideomode() for a list of manifest constants
                    that can be used to test for the current video mode.

                    The following manifest constants can be used to test
                    adapter values for a particular adapter using the
                    bitwise-AND operator (&):

                    Constant     Meaning
                    ---------    --------------------------------
                    _MDPA        Monochrome Display Adapter (MDPA)
                    _CGA         Color Graphics Adapter     (CGA)
                    _EGA         Enhanced Graphics Adapter  (EGA)
                    _MCGA        MultiColor Graphics Array  (MCGA)
                    _VGA         Video Graphics Array       (VGA)
                    _HGC         Hercules graphics cards    (HGC)

                    The following manifest constants can be used to test
                    monitor values for a particular monitor using the
                    bitwise-AND operator (&):

                    Constant     Meaning
                    ---------    --------------------------------
                    _MONO        Monochrome
                    _COLOR       Color (or Enhanced emulating color)
                    _ENHCOLOR    Enhanced Color
                    _ANALOG      Analog

   Portability:     MS-DOS only, true MDPA, CGA, EGA, MCGA, or VGA video
                    compatibles

 -------------------------------- Example ---------------------------------

    This program gets the current graphics environment information.

           #include <graph.h>

           main()
           {
              struct videoconfig config;

              . . . set proper video mode . . .

              _getvideoconfig(config);

              . . . perform graphics routines . . .

           }



See Also: _setvideomode()

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