GetIndString
GetIndString
Get handle to a string from an indexed resource Str255 theString ; address to receive Pascal string short strListID ; resource ID of a 'STR#' resource to search
short index ; identifies which string to get
This copies a string from an indexed resource (type 'STR#') into a specified
data area.
theString is the address of a buffer to receive the data. Upon return, it will be
filled with a Pascal string; up to 256 bytes of data.
If the string specified by index is not found, the first byte of
theString will be set to 0, indicating the empty string.
strListID identifies the resource to access. It is the resource ID of an 'STR#'
type resource that contains the string you wish to obtain.
index selects which string (of the strings in resource strListID ) you
wish to obtain.
Notes: This function uses GetResource( 'STR#', strListID ) to access the resource, then looks up the string specified by index and copies its data into
theString . Remember to start indexing from 1, not 0.
If you want to make your program easy to convert to a non-English
language, you may want to put all messages, etc., into resources and use
resources do not subtract from your 32K data area.