Important: The information in this document is obsolete and should not be used for new development.
HMScanTemplateItems
You can use theHMScanTemplateItemsfunction to search for a resource of type'hdlg'or'hrct'.
FUNCTION HMScanTemplateItems (whichID, whichResFile: Integer; whichType: ResType): OSErr;
whichID- The resource ID of the
'hdlg'or'hrct'resource to search for.whichResFile- The file reference number of the resource file to search.
whichType- The type of help resource to search for--either
'hdlg'or'hrct'.DESCRIPTION
TheHMScanTemplateItemsfunction searches a resource file for resources of type'hdlg'or'hrct'. Specify the resource ID of the'hdlg'or'hrct'resource to search for in thewhichIDparameter. Specify the resource type in thewhichTypeparameter. WhenHMScanTemplateItemsreturns the value fornoErr, the Help Manager applies the help messages in the specified'hdlg'or'hrct'resource to the active window.The resource file specified in the
whichResFileparameter must already be open. Specify -1 in thewhichResFileparameter to search the current resource file.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theHMScanTemplateItemsfunction are
Trap macro Selector _Pack14 $0410 RESULT CODES
noErr 0 No error fnOpnErr -38 File not open memFullErr -108 Not enough room in heap zone resNotFound -192 Unable to read resource SEE ALSO
If you want the capability thatHMScanTemplateItemsprovides without modifying your code, you can add aHelpItemitem to your item list ('DITL') resources or add an'hwin'resource--as described in "Adding a Help Item to an Item List Resource" on page 3-57 and in "Associating Help Resources With Static Windows" on page 3-63.