home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!wupost!csus.edu!netcom.com!leonardr
- From: leonardr@netcom.com (Leonard Rosenthol)
- Subject: Re: Adding menus to existing applications (a la Thunder)
- Message-ID: <p3wn7_d.leonardr@netcom.com>
- Date: Sat, 12 Sep 92 21:58:35 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- References: <1992Sep12.154540.15753@prism.poly.edu> <BuH8LA.Crq@mentor.cc.purdue.edu>
- Lines: 35
-
- In article <BuH8LA.Crq@mentor.cc.purdue.edu> haynes@mace.cc.purdue.edu (Carl W. Haynes III) writes:
- >In article <1992Sep12.154540.15753@prism.poly.edu> korfhage@weston.poly.edu writes:
- >> [ asks how to add menus to existing applications ]
- >>
- >
- >I wrote an INIT awhile ago which added a menu to SimAnt (SimAnt Cheater)
- >
- >What I ended up doing was tail-patching _SetMenuBar and _MenuSelect.
- >
- >On SetMenuBar, I would check to see if I was dealing with SimAnt and then
- >Create a new menu and insert it. The patch for _MenuSelect would simply
- >check to see if my menu was selected and respond accordingly.
- >I was only worried about making it work with this one application, I don't
- >know how generalizable this would be to others.
- >
- that's the basic idea, though I would suggest patching _DrawMenuBar
- instead of _SetMenuBar, since many apps don't call _SetMenuBar. Also, if
- you are planning any cmdKey equivalents, then you'll need to patch
- _menuKey as well.
-
- >If you're only dealing with system 7, I'd suggest looking into how to
- >add icon menus, like the help and application menu, to all applications.
- >(I think they call them Finder Menus).
- >
- they are called System Menus, since they are owned by the System...
- Which brings up a request...PLEASE DO NOT WRITE SYSTEM MENUS!!! They require
- using a slew of undocumented information as well as NOT being guarenteed to
- work in the future (at least not the same way).
-
- --
- -----------------------------------------------------------------------------
- Leonard Rosenthol Internet: leonardr@netcom.com
- Director of Advanced Technology AppleLink: MACgician
- Aladdin Systems, Inc. GEnie: MACgician
-
-