Functions providing a way to access the compiled GRC resources of the AddOn. Used to define and read the localized strings and other resources in a platform-independent manner.
More...
Functions providing a way to access the compiled GRC resources of the AddOn. Used to define and read the localized strings and other resources in a platform-independent manner.
◆ ACAPI_GetOwnResModule()
GSResModule ACAPI_GetOwnResModule |
( |
void | | ) |
|
Returns the add-on's own resource module identifier for loading resources.
- Returns
- NoError - The identifier of the add-on's resource file.
- Example
-
◆ ACAPI_Resource_GetFixStr()
bool ACAPI_Resource_GetFixStr |
( |
char * | str, |
|
|
short | resID, |
|
|
short | index, |
|
|
GSResModule | resModule = ACAPI_GetOwnResModule() ) |
Reads a string from an 'STRf ' string list resource.
- Parameters
-
str | The pointer of the string. |
resID | The resource ID of the ' STRf ' resource in the GRC file. |
index | 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. |
- Returns
- true - The string was retrieved successfully.
- false - The string wasn't retrieved.
◆ ACAPI_Resource_GetLocStr()
bool ACAPI_Resource_GetLocStr |
( |
char * | str, |
|
|
short | resID, |
|
|
short | index, |
|
|
GSResModule | resModule = ACAPI_GetOwnResModule() ) |
Reads a string from an 'STR# ' string list resource.
- 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. |
- Returns
- true - The string was retrieved successfully.
- false - The string wasn't retrieved.
- Example
- This is the according part of the GRC file:
'STR#' 32510 "Fix strings" {
/* [ 1] */ "Saving the file in abc format"
/* [ 2] */ "You have canceled the operation!"
}
In the source of the add-on it can be referred like this char own_res_str[256];
bool succ;
if (succ) {
}
◆ ACAPI_Resource_GetLocUStr()
bool ACAPI_Resource_GetLocUStr |
( |
GS::uchar_t * | str, |
|
|
short | resID, |
|
|
short | index, |
|
|
GSResModule | resModule = ACAPI_GetOwnResModule() ) |
Reads a unicode string from an 'STR# ' string list resource.
- 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. |
- Returns
- true - The string was retrieved successfully.
- false - The string wasn't retrieved.
- 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;
if (succ) {
}