Reads a unicode string from an ‘STR#
‘ string list resource.
bool ACAPI_Resource_GetLocUStr ( GS::uchar_t* str, short resID, short index, GSResModule resModule = ACAPI_GetOwnResModule () );
Parameters
- str
- [out] The pointer of the string.
- resID
- [in] The resource ID of the ‘
STR#
‘ resource in the GRC file. - index
- [in] The index of the string in the resource.
- resModule
- [in] The resource module to load the resource from. The default value is the add-on’s own resource module.
Return Values
true
- The string was retrieved successfully.
false
- The string wasn’t retrieved.
Remarks
This function is used to load a Unicode string from a string list resource, which requires localization.
The GRC compiler uses the ‘STR#
‘ resource type for this purpose. The different lines in the resource will be the indices referenced by index
parameter. For more information about the structure of the GRC file please refer to the GRC documentation.
Example
/* This is the according part of the GRC file: */ 'STR#' 32530 "Localizable strings" { /* [ 1] */ "Saving the file in abc format" /* [ 2] */ "MISSING" } /* In the source of the add-on it can be referred like this */ UC257HeadData header; bool succ; succ = ACAPI_Resource_GetLocUStr (header.missingName, 32530, 2, ACAPI_GetOwnResModule ()); if (succ) { ... }
Requirements
- Version: API 16 or later
- Header: ACAPinc.h
See Also
ACAPI_Resource_GetLocStr, ACAPI_Resource_GetFixStr, ACAPI_GetOwnResModule,
Resource Manager, API Functions