home *** CD-ROM | disk | FTP | other *** search
- /*
- IsWindow.c
-
- safely checks a suspect pointer, returning true if it points to a valid window.
-
- HISTORY:
- 6/13/96 dgp wrote it.
- */
- #ifndef __LOWMEM__
- #include <LowMem.h>
- #endif
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
- Boolean IsWindow(WindowPtr window);
-
- Boolean IsWindow(WindowPtr window)
- {
- WindowRef w=LMGetWindowList();
-
- while(w!=NULL){
- if((WindowRef)window==w)return 1;
- w=GetNextWindow(w);
- }
- return 0;
- }