Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uxe.cso.uiuc.edu!leonardr From: leonardr@uxe.cso.uiuc.edu Newsgroups: comp.sys.mac.programmer Subject: Re: Problems With Menus Message-ID: <226000058@uxe.cso.uiuc.edu> Date: 31 Jan 89 17:45:00 GMT References: <8534@orstcs.CS.ORST.EDU> Lines: 25 Nf-ID: #R:orstcs.CS.ORST.EDU:8534:uxe.cso.uiuc.edu:226000058:000:1354 Nf-From: uxe.cso.uiuc.edu!leonardr Jan 31 11:45:00 1989 lsr@Apple.COM(Larry Rosenstein) writes in comp.sys.mac.programmer >>and when the program needs to reference a menu handle, do: >> GetMHandle(APPLEMENU); > >This works as long as that menu is in the menu bar. GetMHandle searches >through the menus in the menu bar only (which makes it more efficient that >using the Resource Manager). If you don't know for sure that the menu is in >the menu bar, then you can call the Resource Manager. > I believe that what you meant to say Larry, was that it searches the menus in the MENU LIST not the Menu Bar. The difference being that PopUps and HMenus are installed into the MenuList using InsertMenu(theMenu, -1) so that they are not put into the menu bar itself, but put into the MenuList, where GetMHandle can find them as well. +---------------------------------+-----------------------------------+ + Leonard Rosenthol + fact, then again you might decide+ + President, LazerWare, inc. + that it really isn't, so you + + + never know, do you?? + + leonardr@uxe.cso.uiuc.edu + + + GEnie: MACgician + MacNET: MACgician + + Delphi: MACgician + AppleLink: D0025 + +---------------------------------+-----------------------------------+