Get1Resource
Get1Resource
Read resource from current file; get its handle ResType rType ; resource type (e.g., 'FONT', 'MENU', etc.) short rID ; ID of desired resource
returns handle leading to the resource data
Get1Resource locates a particular resource in the current resource file, allocates storage for it, and reads it into memory (unless it is already in
memory). It returns a handle leading to the resource data.
rType is a 4-byte resource type, such as 'MENU', 'DLOG', etc. It specifies
which type of resource you want to access.
rID is the resource identifier, as defined in the current resource file.
Returns: a handle leading to the resource data. A return value of NIL indicates an error-either the resource can not be found or it will not fit into
Notes: This function is the "1-deep" version of GetResource. It obtains resources only from the current resource file (see UseResFile). Refer to Use this function instead of GetResource if you think there may be a collision of resource IDs. For instance, if you use:
myRfRef=CurResFile(); /* do this at startup time */ /*... somebody deleted my resource! ... */
}