home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 124 / af124a.adf / af124a.lzx / WBStartup+V2.8 / Source / WBStartup+Prefs / DisableWindow.c < prev    next >
C/C++ Source or Header  |  1999-03-29  |  757b  |  28 lines

  1. #include <exec/types.h>
  2. #include <intuition/intuition.h>
  3. #include <proto/intuition.h>
  4.  
  5. static ULONG oldIDCMP;   /* Make this static to this file! */
  6. WORD minwidth,minheight; /* minimum window size limits */
  7. UWORD maxwidth,maxheight;/* maximum window size limits */
  8.  
  9. void DisableWindow(struct Window *win)
  10. {
  11.   oldIDCMP=win->IDCMPFlags;
  12.   ModifyIDCMP(win,NULL);
  13.   SetWindowPointer(win,WA_BusyPointer,TRUE,TAG_DONE);
  14.  
  15.   minwidth=win->MinWidth;
  16.   minheight=win->MinHeight;
  17.   maxwidth=win->MaxWidth;
  18.   maxheight=win->MaxHeight;
  19.   WindowLimits(win,win->Width,win->Height,win->Width,win->Height);
  20. }
  21.  
  22. void EnableWindow(struct Window *win)
  23. {
  24.   SetWindowPointer(win,TAG_DONE);
  25.   ModifyIDCMP(win,oldIDCMP);
  26.   WindowLimits(win,minwidth,minheight,maxwidth,maxheight);
  27. }
  28.