home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!spool.mu.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsc!gregg
- From: gregg@cbnewsc.cb.att.com (gregg.g.wonderly)
- Subject: Re: Multiple Windows
- Organization: AT&T
- Date: Tue, 15 Dec 1992 23:33:47 GMT
- Message-ID: <1992Dec15.233347.20801@cbnewsc.cb.att.com>
- References: <8771@orbit.cts.com>
- Lines: 25
-
- From article <8771@orbit.cts.com>, by chucks@pnet51.orb.mn.org (Erik Funkenbusch):
- > So, my solution would be to have my IDCMP Dispatch routine know which window
- > it's dealing with and handle the appropriate gadget based on that.
-
- You can use imsg->IDCMPWindow to tell which window dispatch function
- to go to. This is by far the easiest. I.e.
-
- while( 1 )
- {
- got = Wait( mask );
- while( imsg = GetMsg( windowport ) )
- {
- if( imsg->IDCMPWindow == OptsWnd )
- OptsEvent( imsg );
- else if( imsg->IDCMPWindow == MainWnd )
- MainEvent( imsg );
- else if( imsg->IDCMPWindow == PrefsWnd )
- PrefsEvent( imsg );
- else
- Oops bad IDCMP...
-
- ReplyMsg( imsg );
- }
- }
-
-