Path: utzoo!attcan!uunet!husc6!think!ames!pasteur!ucbvax!ucsd!nosc!manta!lulue From: lulue@manta.NOSC.MIL (Dan Lulue ) Newsgroups: comp.sys.mac.programmer Subject: Changing a menu using a resource Keywords: str255 Message-ID: <346@manta.NOSC.MIL> Date: 16 May 88 22:13:08 GMT Organization: Computer Sciences Corporation Lines: 38 I want to be toggle a menu item from "Turn Herman On" to "Turn Herman Of", and back. The BOOK says that it is good practice to store the two strings in a resource file instead of calling SetItem with the literal strings [SetItem(menus(8),1,"Turn Herman On"), and SetItem(menus(8),1, "Turn Herman Off")].. Always wanting to be proper, I created two entries in the resource file viz: resource 'STR ' (2083) { "Turn Herman On" }; resource 'STR ' (2084) { "Turn Herman Off" }; and placed the following declarations in the include file: #define ONID 2083 #define OFFID 2084 Is this correct so far? Now GetResource returns a handle to the requested resource. My question is how to map that handle to the strings stored in the resource? Once I have a handle, what do I pass to SetItem?? Here is my GetResource call: Handle theHandle; theHandle = GetResource ('STR ', OFFID); A more generic question is "How does one figure out how to do something the proper way when IM does not tell you how to do it the proper way? Thank you very much in advance for any help you provide. Dan. lulue@nosc.mil