home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / OMEGA2 / T_WIN.CPP < prev    next >
C/C++ Source or Header  |  1992-04-25  |  2KB  |  53 lines

  1. //
  2. // *************************************************************************
  3. // *                                                                       *
  4. // *    T_Win Demonstration                                                *
  5. // *                                                                       *
  6. // *    OMEGA C++ Windowing Class Library                                  *
  7. // *    =================================                                  *
  8. // *                                                                       *
  9. // *    Copyright 1991,92 Tom Clancy                                       *
  10. // *    Submitted to the public domain, April 1992                         *
  11. // *                                                                       *
  12. // *************************************************************************
  13. //
  14.  
  15. #include "omscreen.hpp"
  16. #include "omwin.hpp"
  17.  
  18. class mywin : public oWindow {
  19. public:
  20.   mywin();
  21.   void display_info();
  22. }
  23.  
  24. mywin::mywin() {
  25.   setwindow(1,1,80,20,WHITE,BLUE,DOUBLEBAR);
  26.   setshadow(ON,shBottomright);
  27.   settitle(" Window ",tCenter,BLACK,LIGHTGRAY);
  28. }
  29.  
  30. void mywin::display_info() {
  31.   writebetween(2,1,getwid()-1,WHITE,BLUE,"Welcome to OMEGA!");
  32.   writebetween(4,1,getwid()-1,WHITE,BLUE,"The Object Oriented C++ Library for creating fancy text windowed");
  33.   writebetween(5,1,getwid()-1,WHITE,BLUE,"applications using Borland C++ 2.0");
  34. }
  35.  
  36. main() {
  37.   initmouse();
  38.   OMEGA_SETUP();
  39.   oScreen S;
  40.   S.setvga50();
  41.   S.activate_virtual();
  42.   S.fillscreen(WHITE,CYAN,32);
  43.   mywin W;
  44.   W.openwin();
  45.   S.deactivate_virtual();
  46.   S.showmouse();
  47.   S.cursoroff();
  48.   W.run();
  49.   S.restoreoldvmode();
  50.   S.hidemouse();
  51.   return 0;
  52. }
  53.