Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 3 - Help Manager / Help Manager Reference
Help Manager Routines / Setting and Getting Information for Help Resources


HMScanTemplateItems

You can use the HMScanTemplateItems function 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
The HMScanTemplateItems function 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 the whichID parameter. Specify the resource type in the whichType parameter. When HMScanTemplateItems returns the value for noErr, the Help Manager applies the help messages in the specified 'hdlg' or 'hrct' resource to the active window.

The resource file specified in the whichResFile parameter must already be open. Specify -1 in the whichResFile parameter to search the current resource file.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the HMScanTemplateItems function are
Trap macroSelector
_Pack14$0410

RESULT CODES
noErr0No error
fnOpnErr-38File not open
memFullErr-108Not enough room in heap zone
resNotFound-192Unable to read resource
SEE ALSO
If you want the capability that HMScanTemplateItems provides without modifying your code, you can add a HelpItem item 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996