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


HMGetDialogResID

You can use the HMGetDialogResID function to get the resource ID of the 'hdlg' resource that will be used by the next dialog box as a result of a previous call to the HMSetDialogResID function.

FUNCTION HMGetDialogResID (VAR resID: Integer): OSErr;
resID
The resource ID of the last 'hdlg' resource set with the HMSetDialogResID function.
DESCRIPTION
The HMGetDialogResID function returns in its resID parameter the resource ID of the last 'hdlg' resource set with the HMSetDialogResID function.

You can use the HMGetDialogResID and HMSetDialogResID functions when your application displays nested dialog boxes (although you should generally close one dialog box before displaying another). For example, you can save the 'hdlg' resource of the current dialog box, set a new 'hdlg' resource, display the new dialog box, and then restore the setting of the previous 'hdlg' resource when you close the second dialog box.

If the 'hdlg' resource currently in use was not set by a call to the HMSetDialogResID function, the HMGetDialogResID function returns a result code of resNotFound.

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

RESULT CODES
noErr0No error
memFullErr-108Not enough room in heap zone
resNotFound-192Unable to read resource
SEE ALSO
You typically use HMGetDialogResID in conjunction with the HMSetDialogResID function, which is described on page 3-110.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996