Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>closegraph() shut down the graphics system</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 closegraph()            Shut Down the Graphics System

 #include   <graphics.h>

 void far   closegraph(void);

    closegraph() shuts down the graphics system by deallocating  all the
    memory that was allocated by initgraph().  The screen is restored to
    the mode it was in before initgraph() was called.  closegraph() is a
    graphics system control function and should be the last graphics
    function called.

    Returns:    Nothing.

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

    The following statements open and close a graphic system. 'gdriver'
    is set to the constant DETECT and therefore 'gmode' is set to the
    highest resolution available for the detected driver.

           #include <graphics.h>

           int gdriver = DETECT;
           int gmode;

           main()
           {
               initgraph(&gdriver,&gmode,"");
               .
               .
               /* graphic operations */
               .
               .
               closegraph();
           }


See Also: _graphgetmem() initgraph() restorecrtmode()

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