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>restorecrtmode() restore system mode to pre-initgraph() setting</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 restorecrtmode()        Restore System Mode to Pre-initgraph() Setting

 void       far restorectrmode(void);

    restorecrtmode() restores the original screen mode that existed prior
    to calling initgraph().  Most often, this represents the text mode.
    restorecrtmode() and setgraphmode() can be alternately called to
    switch between text and graphics mode.

    Returns:     Nothing.

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

    The following statements save the current graphics mode before
    changing it to text mode  and restore it to graphics mode before the
    program terminates.

           #include <graphics.h>

           int gdriver = DETECT;
           int gmode;

           main()
           {
               int savemode;

               initgraph(&gdriver,&gmode,"");
               savemode = getgraphmode();
               restorecrtmode();
               setgraphmode(savemode);
               closegraph();
           }


See Also: getgraphmode() setgraphmode()

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