home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1997 #3 / amigamamagazinepolishissue03-1 / ma_1995 / 06 / ami039a.txt < prev    next >
Text File  |  1997-04-07  |  1KB  |  103 lines

  1. /* listing 4 */
  2.  
  3.  
  4.  
  5. #include <intuition/intuition.h>
  6.  
  7.  
  8.  
  9. #include <proto/dos.h>
  10.  
  11. #include <proto/exec.h>
  12.  
  13. #include <proto/intuition.h>
  14.  
  15.  
  16.  
  17. struct IntuitionBase *IntuitionBase;
  18.  
  19. struct Window *window1, *window2;
  20.  
  21. struct TagItem    taglist[]=
  22.  
  23. {
  24.  
  25.     {WA_Left, 10},
  26.  
  27.     {WA_Top,    20},
  28.  
  29.     {WA_Width, 200},
  30.  
  31.     {WA_Height, 75},
  32.  
  33.     {WA_Title, (ULONG)"Okno 1 :-) wesoîe"},
  34.  
  35.     {WA_Flags, WFLG_DRAGBAR | WFLG_DEPTHGADGET | WFLG_RMBTRAP | WFLG_ACTIVATE},
  36.  
  37.     {WA_ScreenTitle, (ULONG)"Okno 1 twierdzi, ûe jest wesoîe. Ôwiat jest piëkny!!!"},
  38.  
  39.     TAG_DONE
  40.  
  41. };
  42.  
  43.  
  44.  
  45. int main(int argc, char *argv[])
  46.  
  47. {
  48.  
  49.     check_os(OS_20);
  50.  
  51.     if (IntuitionBase=(struct IntuitionBase*)OpenLibrary("intuition.library", 37))
  52.  
  53.     {
  54.  
  55.         /* Udaîo sië otworzyê bibliotekë */
  56.  
  57.         if (window1=OpenWindowTagList(0, taglist))
  58.  
  59.         {
  60.  
  61.             Delay(100);    /* Poczekamy chwilkë */
  62.  
  63.             if (window2=OpenWindowTags(0,
  64.  
  65.                 WA_Left, 100,
  66.  
  67.                 WA_Top, 100,
  68.  
  69.                 WA_Width, 250,
  70.  
  71.                 WA_Height, 50,
  72.  
  73.                 WA_Title, "Okno 2 :-( smutne",
  74.  
  75.                 WA_Flags, WFLG_DRAGBAR | WFLG_CLOSEGADGET | WFLG_DEPTHGADGET | WFLG_ACTIVATE,
  76.  
  77.                 WA_ScreenTitle, "To okno jest smutne bo ludzie sâ okrutni.",
  78.  
  79.                 TAG_END))
  80.  
  81.             {
  82.  
  83.                 Delay(500); /* Poczekamy wiëkszâ chwilë */
  84.  
  85.                 CloseWindow(window2); /* Zamknijmy otwarte wczeôniej okno */
  86.  
  87.             }
  88.  
  89.             CloseWindow(window1);
  90.  
  91.         }
  92.  
  93.         /* Przed wyjôciem naleûy zamknâê bibliotekë */
  94.  
  95.         CloseLibrary((struct Library*)IntuitionBase);
  96.  
  97.     }
  98.  
  99.     return 0;
  100.  
  101. }
  102.  
  103.