home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 145.lha / TableCloth / getnewwi.c < prev    next >
C/C++ Source or Header  |  1986-11-21  |  1KB  |  37 lines

  1. /*
  2.  *  This is a totally safe (and straightforward if you are new to C) way
  3.  *  to open a window that was in the original DualPF.c program.
  4.  *
  5.  */
  6.  
  7. struct    Window *getNewWind(left, top, width, height, flg, iflg)
  8. SHORT    left, top, width, height;
  9. ULONG    flg, iflg;
  10. {
  11.     struct  Window  *OpenWindow();
  12.     struct  NewWindow    nw;
  13.  
  14.     nw.LeftEdge     =    (SHORT) left;
  15.     nw.TopEdge        =    (SHORT) top;
  16.     nw.Width        =    (SHORT) width;
  17.     nw.Height        =    (SHORT) height;
  18.     nw.DetailPen    =    (UBYTE) -1;
  19.     nw.BlockPen     =    (UBYTE) -1;
  20.  
  21.     nw.IDCMPFlags   =    (ULONG) iflg;
  22.     nw.Flags        =    (ULONG) flg;
  23.  
  24.     nw.FirstGadget  =    (struct Gadget *)   NULL;
  25.     nw.CheckMark    =    (struct Image *)    NULL;
  26.     nw.Title        =    (UBYTE *)   "TableCloth 1.0 © 1987 John Russell ";  /* vi eats the copyright symbol; if there's just a bracket it should be a "copyright" character */
  27.     nw.Screen        =    (struct Screen *)   NULL;
  28.     nw.BitMap        =    (struct BitMap *)   NULL;
  29.     nw.MinWidth     =    (SHORT) 50;
  30.     nw.MinHeight    =    (SHORT) 30;
  31.     nw.MaxWidth     =    (SHORT) nw.Width;
  32.     nw.MaxHeight    =    (SHORT) nw.Height;
  33.     nw.Type        =    (USHORT) WBENCHSCREEN;
  34.  
  35.     return ((struct Window *) OpenWindow(&nw));
  36. }
  37.