Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!mcsun!hp4nl!tuegate.tue.nl!rc6.urc.tue.nl!rwa.urc.tue.nl!rcbalc From: rcbalc@rwa.urc.tue.nl (Luc Cluitmans) Newsgroups: comp.sys.mac.programmer Subject: Re: Help Manager resources 'hfdr' 'hmnu' 'hwin' etc ....(long) Message-ID: <645@rc6.urc.tue.nl> Date: 10 Jun 91 18:10:40 GMT Article-I.D.: rc6.645 References: Sender: news@rc6.urc.tue.nl Reply-To: rcbalc@urc.tue.nl Organization: Eindhoven University of Technology, The Netherlands Lines: 55 In article bda@uther.calvin.edu (Bruce Abernethy) writes: >I am trying to create some resources to utilize the Help Manager in System 7 >but there are no TMPLs in ResEdit 2.1 for these resources. In addition, >my versions of SARez (3.2) aand Rez (MPW 3.1) do not seem to like the >resource code in InsideMacintoshVI. Are ther updated versions of these >resource editors available? Or is there a better way? (i.e. this mysterious >"BaloonWriter" that some people have mentioned). I've been searching for these TMPL's too but I couldn't find them either. IM VI isn't very helpfull on describing what's in these resources at byte level, so I couldn't use the HEX-editor to create them. However, by looking at an application that contained help-resources (Applicon) I found out what bytes weren't described in IM-VI. As far as I can remember (I don't have my mac here, so I can't check) the 'hmnu'-resource was build as follows: The header consists of 4 words; Normally they are(in HEX): 0002 0000 0000 0000 Then comes a longword containing the number of help items in the menu (including the menu-title, but excluding the default-items). When there's one item in the menu this will be 0000 0002. Then follow the help-blocks. As described in IM-VI: one block for defaults, one block for the menu title, and then one block for each menu item. Each block begins with a word containing the length of the block. After this there's the type of help. I remember 0100 for SkipItem and 0003 for STR#-based item. What follows depends on the type. For a SkipItem nothing follows. (so a full SkipItem is 0004 0100) For a STR#-based item 4 doublewords follow: each is the resource-id and index for a STR#-resource with the help-text. The first doubleword points to the help text fo a normal menu-item. The second is for a hidden menu-item The third and fourth are for checked and marked menu-items. I Don't know about the other types. Look at IM-VI and take a guess; it shouldn't be difficult. To conclude: a hmnu-resource for a menu with two normal items divided by a divide line is (referring to STR# 1234): 0002 0000 0000 0000 ; Normal header 0000 0004 ; four items excluding defaults 0004 0100 ; No defaults (SkipItem) 0014 0003 1234 0001 1234 0002 1234 0001 1234 0001 ; menu title 0014 0003 1234 0003 1234 0004 1234 0005 1234 0006 ; first item 0004 0100 ; Dividing line (SkipItem) 0014 0003 1234 0007 1234 0008 1234 0009 1234 000A ; second item Remember: I'm typing this from memory and I can't check it at the moment but I hope I didn't make any mistakes. Greetings from the Netherlands, Luc Cluitmans, rcbalc@urc.tue.nl -- ............................................................................ Luc Cluitmans rcbalc@urc.tue.nl Don't Worry, Be happy! (Signature under construction... Be patient.)