home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15407 < prev    next >
Encoding:
Text File  |  1992-09-12  |  2.1 KB  |  46 lines

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