Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!cs.umn.edu!kksys!edgar!saylor!macgate!Uucp From: Jim.Spencer@p510.f22.n282.z1.fidonet.org (Jim Spencer) Newsgroups: comp.sys.mac.programmer Subject: A Menu Question Message-ID: <674985727.0@macgate.fidonet> Date: 21 May 91 03:39:18 GMT Article-I.D.: macgate.674985727.0 Sender: Uucp@p0.f22.n282.z1.fidonet.org Lines: 16 Creig Donnald writes in a message to All CD> My problem is this: I use the GetMenu procedure to request menu CD> resources from my resource file. However, the MenuID of the requested CD> menus is being set to 128 rather than the number I supply. For CD> some reason, this also means that the menus will not show up CD> on my menubar. Every menu has a menu ID regardless of whether it is created by you in your program with NewMenu() or by a resource with GetMenu. When you use NewMenu() like in your Apple menu, you provide the menuID. When you build your menu from a resource, the resource contains the ID. Menu resources however also, like all resources have a resource ID which is not necessarily the same as the menuID for the menu in the resource. When you create your menus in ResEdit, it initially sets both ID's to the same number, 128 or the next highest unused ID. You apparently have changed the resource IDs to your own number, 401 - 404 but you have not changed the menu ID's to match. Its been a while since I've looked at what happens when you have menuID conflicts but I think the reason that the File menu is showing up is that it is the first with menuID = 128. The others don't get added as there already is a menuID 128 in the menuBar. I assume you know how to change the menu resource ID but just to be sure there is no confusion, the resource ID is set in ResEdit just like any other resource: by selecting Get Resource Info from the Resource menu when you have selected a specific MENU resource in the picker or the editor. The menuID is set by selecting Edit Menu & MDEF ID... under the Menu menu when you have a particular menu resource open in the editor. * Origin: White Mailer Test Point (1.0d6) (1:282/22.510)