Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!hp4nl!uva!borton From: borton@uva.UUCP (Chris Borton) Newsgroups: comp.sys.mac.programmer Subject: Re: Implementing a Talking Menu Message-ID: <681@uva.UUCP> Date: 4 Apr 89 15:53:13 GMT References: <3937@bgsuvax.UUCP> <7826@boulder.Colorado.EDU> <19742@srcsip.UUCP> Reply-To: borton@uva.UUCP (Chris Borton) Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam Lines: 33 In article <19742@srcsip.UUCP> mnkonar@gorby.UUCP (Murat N. Konar) writes: >There is a low memory global that holds a pointer to a routine that gets called >whenever there is a menu down. It gets called repeatedly until the mouse is >released. (Sorry I can't remember the name or location of this global. Check >IM X-Ref) Point this at a routine that examines another low memory global >(which I also can't remember the name of) that holds the menuID and item >currently highlighted. Using the menu ID and item you can get the item >text by calling GetMenuItem. > >I just remembered: the routine pointer is called MenuHook and I think the >menuID and Item global is called MenuChoice. Look 'em up. Standard >warnings about the use of lowmwmory globals apply. Im I-369: MBarHook is the low-mem global for a hook routine to be repeatedly called during a menu. [Note: this is how QuicKeys and others do a pseudo-menu bar via user-items & pop-up menus] TheMenu is the currently highlited menu (word). Note also that there are some changes in Inside Mac V, some of which only apply to the Mac II. For example, on a Mac II you can call MenuChoice() after returning from a MenuSelect() zero to get the *disabled* item the mouse was released over. On a Plus/SE this has to be done directly by looking at the global MenuDisable. I haven't tried it, but what would MenuChoice() do if called on a Plus/SE? Aren't these systems supposed to be compatible :-))) ? Hope this helps a bit... -cbb -- Chris Borton borton%uva@mcvax.{nl,bitnet,uucp} Rotary Scholar & Network Administrator, University of Amsterdam CS