home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 6
/
AACD06.ISO
/
AACD
/
System
/
WBStartup+
/
Source
/
WBStartup+Prefs
/
DisableWindow.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-10-26
|
757b
|
28 lines
#include <exec/types.h>
#include <intuition/intuition.h>
#include <proto/intuition.h>
static ULONG oldIDCMP; /* Make this static to this file! */
WORD minwidth,minheight; /* minimum window size limits */
UWORD maxwidth,maxheight;/* maximum window size limits */
void DisableWindow(struct Window *win)
{
oldIDCMP=win->IDCMPFlags;
ModifyIDCMP(win,NULL);
SetWindowPointer(win,WA_BusyPointer,TRUE,TAG_DONE);
minwidth=win->MinWidth;
minheight=win->MinHeight;
maxwidth=win->MaxWidth;
maxheight=win->MaxHeight;
WindowLimits(win,win->Width,win->Height,win->Width,win->Height);
}
void EnableWindow(struct Window *win)
{
SetWindowPointer(win,TAG_DONE);
ModifyIDCMP(win,oldIDCMP);
WindowLimits(win,minwidth,minheight,maxwidth,maxheight);
}