HMGetMenuResID
After you use the HMSetMenuResID function to associate a menu with an 'hmnu' resource, you can use the HMGetMenuResID function to get the resource ID of the 'hmnu' resource.
FUNCTION HMGetMenuResID (menuID: Integer;
VAR resID: Integer): OSErr;
menuID
- The menu for which you want the associated
'hmnu' resource. The value specified in the menuID parameter must have been previously associated using the HMSetMenuResID function.
resID
- The resource ID of the
'hmnu' resource associated with the specified menu.
DESCRIPTION
HMGetMenuResID returns in its resID parameter the resource ID of the 'hmnu' resource associated with the menu specified by the menuID parameter. If the menu does not have an 'hmnu' resource that was previously set using HMSetMenuResID, the HMGetMenuResID function returns -1 in the resID parameter and a nonzero result code.
ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the HMGetMenuResID function are
| Trap macro | Selector |
| _Pack14 | $0314 |
RESULT CODES
| noErr | 0 | No error |
| resNotFound | -192 | Unable to read resource |
SEE ALSO
The HMSetMenuResID function is described on page 3-107.